Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d96ada53
Commit
d96ada53
authored
May 11, 2004
by
tomas@mc05.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lots of HAVE_ and some ndb_global fixes for ndb subtree
parent
daff95f5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
83 deletions
+29
-83
ndb/include/ndb_net.h
ndb/include/ndb_net.h
+7
-0
ndb/include/portlib/NdbTCP.h
ndb/include/portlib/NdbTCP.h
+2
-10
ndb/include/portlib/NdbThread.h
ndb/include/portlib/NdbThread.h
+1
-2
ndb/src/common/portlib/unix/NdbCondition.c
ndb/src/common/portlib/unix/NdbCondition.c
+9
-40
ndb/src/common/portlib/unix/NdbMem.c
ndb/src/common/portlib/unix/NdbMem.c
+4
-4
ndb/src/common/portlib/unix/NdbSleep.c
ndb/src/common/portlib/unix/NdbSleep.c
+1
-11
ndb/src/common/portlib/unix/NdbThread.c
ndb/src/common/portlib/unix/NdbThread.c
+2
-3
ndb/src/common/portlib/unix/NdbTick.c
ndb/src/common/portlib/unix/NdbTick.c
+3
-7
ndb/src/kernel/vm/Emulator.cpp
ndb/src/kernel/vm/Emulator.cpp
+0
-6
No files found.
ndb/include/ndb_net.h
0 → 100644
View file @
d96ada53
#ifndef NDBNET_H
#define NDBNET_H
#include <my_net.h>
#endif
ndb/include/portlib/NdbTCP.h
View file @
d96ada53
...
...
@@ -18,6 +18,7 @@
#define NDB_TCP_H
#include <ndb_global.h>
#include <ndb_net.h>
#if defined NDB_OSE || defined NDB_SOFTOSE
/**
...
...
@@ -45,10 +46,6 @@ typedef int socklen_t;
/**
* Include files needed
*/
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#define NDB_NONBLOCK O_NONBLOCK
...
...
@@ -75,12 +72,7 @@ typedef int socklen_t;
#endif
#ifndef NDB_MACOSX
#define NDB_SOCKLEN_T socklen_t
#else
#define NDB_SOCKLEN_T int
#endif
#define NDB_SOCKLEN_T SOCKET_SIZE_TYPE
#ifdef __cplusplus
extern
"C"
{
...
...
ndb/include/portlib/NdbThread.h
View file @
d96ada53
...
...
@@ -17,8 +17,7 @@
#ifndef NDB_THREAD_H
#define NDB_THREAD_H
#include <sys/types.h>
#include <ndb_global.h>
#ifdef __cplusplus
extern
"C"
{
...
...
ndb/src/common/portlib/unix/NdbCondition.c
View file @
d96ada53
...
...
@@ -61,7 +61,6 @@ NdbCondition_Wait(struct NdbCondition* p_cond,
return
result
;
}
#if defined NDB_SOLARIS || defined NDB_HPUX
#include <time.h>
int
NdbCondition_WaitTimeout
(
struct
NdbCondition
*
p_cond
,
...
...
@@ -74,7 +73,16 @@ NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
if
(
p_cond
==
NULL
||
p_mutex
==
NULL
)
return
1
;
#ifdef HAVE_CLOCK_GETTIME
clock_gettime
(
CLOCK_REALTIME
,
&
abstime
);
#else
{
struct
timeval
tick_time
;
gettimeofday
(
&
tick_time
,
0
);
abstime
.
tv_sec
=
tick_time
.
tv_sec
;
abstime
.
tv_nsec
=
tick_time
.
tv_usec
*
1000
;
}
#endif
if
(
msecs
>=
1000
){
secs
=
msecs
/
1000
;
...
...
@@ -92,45 +100,6 @@ NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
return
result
;
}
#endif
#if defined NDB_LINUX || defined NDB_MACOSX
#include <unistd.h>
#include <sys/time.h>
int
NdbCondition_WaitTimeout
(
struct
NdbCondition
*
p_cond
,
NdbMutex
*
p_mutex
,
int
msecs
){
int
result
;
struct
timespec
abstime
;
struct
timeval
tick_time
;
int
secs
=
0
;
if
(
p_cond
==
NULL
||
p_mutex
==
NULL
)
return
1
;
gettimeofday
(
&
tick_time
,
0
);
if
(
msecs
>=
1000
){
secs
=
msecs
/
1000
;
msecs
=
msecs
%
1000
;
}
abstime
.
tv_sec
=
tick_time
.
tv_sec
+
secs
;
abstime
.
tv_nsec
=
tick_time
.
tv_usec
*
1000
+
msecs
*
1000000
;
if
(
abstime
.
tv_nsec
>=
1000000000
)
{
abstime
.
tv_sec
+=
1
;
abstime
.
tv_nsec
-=
1000000000
;
}
result
=
pthread_cond_timedwait
(
&
p_cond
->
cond
,
p_mutex
,
&
abstime
);
return
result
;
}
#endif
int
NdbCondition_Signal
(
struct
NdbCondition
*
p_cond
){
...
...
ndb/src/common/portlib/unix/NdbMem.c
View file @
d96ada53
...
...
@@ -54,16 +54,16 @@ void NdbMem_Free(void* ptr)
int
NdbMem_MemLockAll
(){
#if
defined NDB_MACOSX
return
0
;
#if
def HAVE_MLOCKALL
return
-
1
;
#else
return
mlockall
(
MCL_CURRENT
);
#endif
}
int
NdbMem_MemUnlockAll
(){
#if
defined NDB_MACOSX
return
0
;
#if
def HAVE_MLOCKALL
return
-
1
;
#else
return
munlockall
();
#endif
...
...
ndb/src/common/portlib/unix/NdbSleep.c
View file @
d96ada53
...
...
@@ -15,19 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "NdbSleep.h"
#ifdef NDB_SOLARIS
#include <sys/types.h>
#include <unistd.h>
#endif
#if defined NDB_LINUX || defined NDB_HPUX || defined NDB_MACOSX
#include <time.h>
#include <unistd.h>
#endif
int
NdbSleep_MilliSleep
(
int
milliseconds
){
int
result
=
0
;
...
...
ndb/src/common/portlib/unix/NdbThread.c
View file @
d96ada53
...
...
@@ -16,9 +16,8 @@
#include <ndb_global.h>
#include "NdbThread.h"
#include <pthread.h>
#include <NdbThread.h>
#include <my_pthread.h>
#define MAX_THREAD_NAME 16
...
...
ndb/src/common/portlib/unix/NdbTick.c
View file @
d96ada53
...
...
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "NdbTick.h"
#include <time.h>
#define NANOSEC_PER_SEC 1000000000
#define MICROSEC_PER_SEC 1000000
...
...
@@ -25,7 +25,7 @@
#define MILLISEC_PER_NANOSEC 1000000
#if
defined NDB_SOLARIS || NDB_HPUX
#if
def HAVE_CLOCK_GETTIME
NDB_TICKS
NdbTick_CurrentMillisecond
(
void
)
{
struct
timespec
tick_time
;
...
...
@@ -44,11 +44,7 @@ NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros){
*
micros
=
t
.
tv_nsec
/
1000
;
return
res
;
}
#endif
#if defined NDB_LINUX || NDB_MACOSX
#include <unistd.h>
#include <sys/time.h>
#else
NDB_TICKS
NdbTick_CurrentMillisecond
(
void
)
{
struct
timeval
tick_time
;
...
...
ndb/src/kernel/vm/Emulator.cpp
View file @
d96ada53
...
...
@@ -39,12 +39,6 @@ extern "C" {
extern
void
(
*
ndb_new_handler
)();
}
#if defined (NDB_LINUX) || defined (NDB_SOLARIS)
#include <sys/types.h>
#include <sys/wait.h>
#endif
/**
* Declare the global variables
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment