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
c21b4754
Commit
c21b4754
authored
20 years ago
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix c++ style comments in .h and .c files
compilation problems on some platforms'
parent
e95f46bb
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
252 additions
and
242 deletions
+252
-242
ndb/include/kernel/BlockNumbers.h
ndb/include/kernel/BlockNumbers.h
+3
-3
ndb/include/kernel/GlobalSignalNumbers.h
ndb/include/kernel/GlobalSignalNumbers.h
+99
-99
ndb/include/kernel/ndb_limits.h
ndb/include/kernel/ndb_limits.h
+5
-5
ndb/include/kernel/trigger_definitions.h
ndb/include/kernel/trigger_definitions.h
+6
-6
ndb/include/mgmapi/mgmapi.h
ndb/include/mgmapi/mgmapi.h
+77
-67
ndb/include/portlib/NdbCondition.h
ndb/include/portlib/NdbCondition.h
+31
-31
ndb/include/portlib/PortDefs.h
ndb/include/portlib/PortDefs.h
+20
-20
ndb/include/portlib/prefetch.h
ndb/include/portlib/prefetch.h
+2
-2
ndb/src/common/portlib/NdbDaemon.c
ndb/src/common/portlib/NdbDaemon.c
+1
-1
ndb/src/common/portlib/NdbMem.c
ndb/src/common/portlib/NdbMem.c
+1
-1
ndb/src/common/portlib/NdbThread.c
ndb/src/common/portlib/NdbThread.c
+2
-2
ndb/src/common/portlib/memtest.c
ndb/src/common/portlib/memtest.c
+4
-4
ndb/src/common/util/basestring_vsnprintf.c
ndb/src/common/util/basestring_vsnprintf.c
+1
-1
No files found.
ndb/include/kernel/BlockNumbers.h
View file @
c21b4754
...
@@ -20,13 +20,13 @@
...
@@ -20,13 +20,13 @@
#include <kernel_types.h>
#include <kernel_types.h>
#include <RefConvert.hpp>
#include <RefConvert.hpp>
/
/ 240
/
* 240 */
#define MIN_API_BLOCK_NO 0x8000
#define MIN_API_BLOCK_NO 0x8000
/
/ 2047
/
* 2047 */
#define API_PACKED 0x07ff
#define API_PACKED 0x07ff
/
/ 4002
/
* 4002 */
#define API_CLUSTERMGR 0x0FA2
#define API_CLUSTERMGR 0x0FA2
#define BACKUP 0xF4
#define BACKUP 0xF4
...
...
This diff is collapsed.
Click to expand it.
ndb/include/kernel/GlobalSignalNumbers.h
View file @
c21b4754
This diff is collapsed.
Click to expand it.
ndb/include/kernel/ndb_limits.h
View file @
c21b4754
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
**/
**/
#define MAX_TUPLES_PER_PAGE 8191
#define MAX_TUPLES_PER_PAGE 8191
#define MAX_TUPLES_BITS 13
/* 13 bits = 8191 tuples per page */
#define MAX_TUPLES_BITS 13
/* 13 bits = 8191 tuples per page */
/
/#define MAX_NO_OF_TUPLEKEY 16 Not currently used
/
*#define MAX_NO_OF_TUPLEKEY 16 Not currently used */
#define MAX_TABLES 1600
#define MAX_TABLES 1600
#define MAX_TAB_NAME_SIZE 128
#define MAX_TAB_NAME_SIZE 128
#define MAX_ATTR_NAME_SIZE 32
#define MAX_ATTR_NAME_SIZE 32
...
@@ -108,13 +108,13 @@
...
@@ -108,13 +108,13 @@
/*
/*
* Ordered index constants. Make configurable per index later.
* Ordered index constants. Make configurable per index later.
*/
*/
#define MAX_TTREE_NODE_SIZE 64
// total words in node
#define MAX_TTREE_NODE_SIZE 64
/* total words in node */
#define MAX_TTREE_PREF_SIZE 4
// words in min prefix
#define MAX_TTREE_PREF_SIZE 4
/* words in min prefix */
#define MAX_TTREE_NODE_SLACK 2
// diff between max and min occupancy
#define MAX_TTREE_NODE_SLACK 2
/* diff between max and min occupancy */
/*
/*
* Blobs.
* Blobs.
*/
*/
#define NDB_BLOB_HEAD_SIZE 2
// sizeof(NdbBlob::Head) >> 2
#define NDB_BLOB_HEAD_SIZE 2
/* sizeof(NdbBlob::Head) >> 2 */
#endif
#endif
This diff is collapsed.
Click to expand it.
ndb/include/kernel/trigger_definitions.h
View file @
c21b4754
...
@@ -47,11 +47,11 @@ struct TriggerType {
...
@@ -47,11 +47,11 @@ struct TriggerType {
struct
TriggerActionTime
{
struct
TriggerActionTime
{
enum
Value
{
enum
Value
{
TA_BEFORE
=
0
,
/
/ Immediate, before operation
TA_BEFORE
=
0
,
/
* Immediate, before operation */
TA_AFTER
=
1
,
/
/ Immediate, after operation
TA_AFTER
=
1
,
/
* Immediate, after operation */
TA_DEFERRED
=
2
,
/
/ Before commit
TA_DEFERRED
=
2
,
/
* Before commit */
TA_DETACHED
=
3
,
/
/ After commit in a separate transaction, NYI
TA_DETACHED
=
3
,
/
* After commit in a separate transaction, NYI */
TA_CUSTOM
=
4
/
/ Hardcoded per TriggerType
TA_CUSTOM
=
4
/
* Hardcoded per TriggerType */
};
};
};
};
...
@@ -60,7 +60,7 @@ struct TriggerEvent {
...
@@ -60,7 +60,7 @@ struct TriggerEvent {
TE_INSERT
=
0
,
TE_INSERT
=
0
,
TE_DELETE
=
1
,
TE_DELETE
=
1
,
TE_UPDATE
=
2
,
TE_UPDATE
=
2
,
TE_CUSTOM
=
3
/
/ Hardcoded per TriggerType
TE_CUSTOM
=
3
/
* Hardcoded per TriggerType */
};
};
};
};
...
...
This diff is collapsed.
Click to expand it.
ndb/include/mgmapi/mgmapi.h
View file @
c21b4754
...
@@ -64,32 +64,32 @@ extern "C" {
...
@@ -64,32 +64,32 @@ extern "C" {
* NDB Cluster node types
* NDB Cluster node types
*/
*/
enum
ndb_mgm_node_type
{
enum
ndb_mgm_node_type
{
NDB_MGM_NODE_TYPE_UNKNOWN
=
-
1
,
/*/
< Node type not known*/
NDB_MGM_NODE_TYPE_UNKNOWN
=
-
1
,
/*
< Node type not known*/
NDB_MGM_NODE_TYPE_API
=
NODE_TYPE_API
,
/*/
< An application node (API)*/
NDB_MGM_NODE_TYPE_API
=
NODE_TYPE_API
,
/*
< An application node (API)*/
NDB_MGM_NODE_TYPE_NDB
=
NODE_TYPE_DB
,
/*/
< A database node (DB)*/
NDB_MGM_NODE_TYPE_NDB
=
NODE_TYPE_DB
,
/*
< A database node (DB)*/
NDB_MGM_NODE_TYPE_MGM
=
NODE_TYPE_MGM
,
/*/< A managemen
t server node (MGM)*/
NDB_MGM_NODE_TYPE_MGM
=
NODE_TYPE_MGM
,
/*< A mgm
t server node (MGM)*/
NDB_MGM_NODE_TYPE_REP
=
NODE_TYPE_REP
,
///< A replication node
NDB_MGM_NODE_TYPE_REP
=
NODE_TYPE_REP
,
/*< A replication node */
NDB_MGM_NODE_TYPE_MIN
=
0
,
/*/
< Min valid value*/
NDB_MGM_NODE_TYPE_MIN
=
0
,
/*
< Min valid value*/
NDB_MGM_NODE_TYPE_MAX
=
3
/*/
< Max valid value*/
NDB_MGM_NODE_TYPE_MAX
=
3
/*
< Max valid value*/
};
};
/**
/**
* Database node status
* Database node status
*/
*/
enum
ndb_mgm_node_status
{
enum
ndb_mgm_node_status
{
NDB_MGM_NODE_STATUS_UNKNOWN
=
0
,
/
//< Node status not known
NDB_MGM_NODE_STATUS_UNKNOWN
=
0
,
/
*< Node status not known*/
NDB_MGM_NODE_STATUS_NO_CONTACT
=
1
,
/
//< No contact with node
NDB_MGM_NODE_STATUS_NO_CONTACT
=
1
,
/
*< No contact with node*/
NDB_MGM_NODE_STATUS_NOT_STARTED
=
2
,
/
//< Has not run starting protocol
NDB_MGM_NODE_STATUS_NOT_STARTED
=
2
,
/
*< Has not run starting protocol*/
NDB_MGM_NODE_STATUS_STARTING
=
3
,
/
//< Is running starting protocol
NDB_MGM_NODE_STATUS_STARTING
=
3
,
/
*< Is running starting protocol*/
NDB_MGM_NODE_STATUS_STARTED
=
4
,
/
//< Running
NDB_MGM_NODE_STATUS_STARTED
=
4
,
/
*< Running*/
NDB_MGM_NODE_STATUS_SHUTTING_DOWN
=
5
,
/
//< Is shutting down
NDB_MGM_NODE_STATUS_SHUTTING_DOWN
=
5
,
/
*< Is shutting down*/
NDB_MGM_NODE_STATUS_RESTARTING
=
6
,
/
//< Is restarting
NDB_MGM_NODE_STATUS_RESTARTING
=
6
,
/
*< Is restarting*/
NDB_MGM_NODE_STATUS_SINGLEUSER
=
7
,
/
//< Maintenance mode
NDB_MGM_NODE_STATUS_SINGLEUSER
=
7
,
/
*< Maintenance mode*/
NDB_MGM_NODE_STATUS_RESUME
=
8
,
/
//< Resume mode
NDB_MGM_NODE_STATUS_RESUME
=
8
,
/
*< Resume mode*/
NDB_MGM_NODE_STATUS_MIN
=
0
,
/
//< Min valid value
NDB_MGM_NODE_STATUS_MIN
=
0
,
/
*< Min valid value*/
NDB_MGM_NODE_STATUS_MAX
=
6
/
//< Max valid value
NDB_MGM_NODE_STATUS_MAX
=
6
/
*< Max valid value*/
};
};
/**
/**
...
@@ -175,24 +175,27 @@ extern "C" {
...
@@ -175,24 +175,27 @@ extern "C" {
* Structure returned by ndb_mgm_get_status
* Structure returned by ndb_mgm_get_status
*/
*/
struct
ndb_mgm_node_state
{
struct
ndb_mgm_node_state
{
int
node_id
;
///< NDB Cluster node id
int
node_id
;
/*< NDB Cluster node id*/
enum
ndb_mgm_node_type
node_type
;
///< Type of NDB Cluster node
enum
ndb_mgm_node_type
node_type
;
/*< Type of NDB Cluster node*/
enum
ndb_mgm_node_status
node_status
;
///< State of node
enum
ndb_mgm_node_status
node_status
;
/*< State of node*/
int
start_phase
;
///< Start phase.
int
start_phase
;
/*< Start phase.
///< @note Start phase is only
*< @note Start phase is only
///< valid if
*< valid if
///< node_type is
*< node_type is
///< NDB_MGM_NODE_TYPE_NDB and
*< NDB_MGM_NODE_TYPE_NDB and
///< node_status is
*< node_status is
///< NDB_MGM_NODE_STATUS_STARTING
*< NDB_MGM_NODE_STATUS_STARTING
int
dynamic_id
;
///< Id for heartbeats and
*/
///< master take-over
int
dynamic_id
;
/*< Id for heartbeats and
///< (only valid for DB nodes)
*< master take-over
int
node_group
;
///< Node group of node
*< (only valid for DB nodes)
///< (only valid for DB nodes)
*/
int
version
;
///< Internal version number
int
node_group
;
/*< Node group of node
int
connect_count
;
///< No of times node has connected
*< (only valid for DB nodes)*/
///< or disconnected to the mgm srv
int
version
;
/*< Internal version number*/
int
connect_count
;
/*< No of times node has connected
*< or disconnected to the mgm srv
*/
char
connect_address
[
sizeof
(
"000.000.000.000"
)
+
1
];
char
connect_address
[
sizeof
(
"000.000.000.000"
)
+
1
];
};
};
...
@@ -200,9 +203,10 @@ extern "C" {
...
@@ -200,9 +203,10 @@ extern "C" {
* Cluster status
* Cluster status
*/
*/
struct
ndb_mgm_cluster_state
{
struct
ndb_mgm_cluster_state
{
int
no_of_nodes
;
///< No of entries in the
int
no_of_nodes
;
/*< No of entries in the
///< node_states array
*< node_states array
struct
ndb_mgm_node_state
///< An array with node_states
*/
struct
ndb_mgm_node_state
/*< An array with node_states*/
node_states
[
1
];
node_states
[
1
];
const
char
*
hostname
;
const
char
*
hostname
;
};
};
...
@@ -211,17 +215,18 @@ extern "C" {
...
@@ -211,17 +215,18 @@ extern "C" {
* Default reply from the server
* Default reply from the server
*/
*/
struct
ndb_mgm_reply
{
struct
ndb_mgm_reply
{
int
return_code
;
///< 0 if successful,
int
return_code
;
/*< 0 if successful,
///< otherwise error code.
*< otherwise error code.
char
message
[
256
];
///< Error or reply message.
*/
char
message
[
256
];
/*< Error or reply message.*/
};
};
/**
/**
* Default information types
* Default information types
*/
*/
enum
ndb_mgm_info
{
enum
ndb_mgm_info
{
NDB_MGM_INFO_CLUSTER
,
/
//< ?
NDB_MGM_INFO_CLUSTER
,
/
*< ?*/
NDB_MGM_INFO_CLUSTERLOG
/
//< Cluster log
NDB_MGM_INFO_CLUSTERLOG
/
*< Cluster log*/
};
};
/**
/**
...
@@ -229,39 +234,44 @@ extern "C" {
...
@@ -229,39 +234,44 @@ extern "C" {
* (Used only in the development of NDB Cluster.)
* (Used only in the development of NDB Cluster.)
*/
*/
enum
ndb_mgm_signal_log_mode
{
enum
ndb_mgm_signal_log_mode
{
NDB_MGM_SIGNAL_LOG_MODE_IN
,
/
//< Log receiving signals
NDB_MGM_SIGNAL_LOG_MODE_IN
,
/
*< Log receiving signals */
NDB_MGM_SIGNAL_LOG_MODE_OUT
,
/
//< Log sending signals
NDB_MGM_SIGNAL_LOG_MODE_OUT
,
/
*< Log sending signals*/
NDB_MGM_SIGNAL_LOG_MODE_INOUT
,
/
//< Log both sending/receiving
NDB_MGM_SIGNAL_LOG_MODE_INOUT
,
/
*< Log both sending/receiving*/
NDB_MGM_SIGNAL_LOG_MODE_OFF
/
//< Log off
NDB_MGM_SIGNAL_LOG_MODE_OFF
/
*< Log off*/
};
};
/**
/**
* Log severities (used to filter the cluster log)
* Log severities (used to filter the cluster log)
*/
*/
enum
ndb_mgm_clusterlog_level
{
enum
ndb_mgm_clusterlog_level
{
NDB_MGM_CLUSTERLOG_OFF
=
0
,
///< Cluster log off
NDB_MGM_CLUSTERLOG_OFF
=
0
,
/*< Cluster log off*/
NDB_MGM_CLUSTERLOG_DEBUG
=
1
,
///< Used in NDB Cluster
NDB_MGM_CLUSTERLOG_DEBUG
=
1
,
/*< Used in NDB Cluster
///< developement
*< developement
NDB_MGM_CLUSTERLOG_INFO
=
2
,
///< Informational messages
*/
NDB_MGM_CLUSTERLOG_WARNING
=
3
,
///< Conditions that are not
NDB_MGM_CLUSTERLOG_INFO
=
2
,
/*< Informational messages*/
///< error condition, but
NDB_MGM_CLUSTERLOG_WARNING
=
3
,
/*< Conditions that are not
///< might require handling
*< error condition, but
NDB_MGM_CLUSTERLOG_ERROR
=
4
,
///< Conditions that should be
*< might require handling
///< corrected
*/
NDB_MGM_CLUSTERLOG_CRITICAL
=
5
,
///< Critical conditions, like
NDB_MGM_CLUSTERLOG_ERROR
=
4
,
/*< Conditions that should be
///< device errors or out of
*< corrected
///< resources
*/
NDB_MGM_CLUSTERLOG_ALERT
=
6
,
///< A condition that should be
NDB_MGM_CLUSTERLOG_CRITICAL
=
5
,
/*< Critical conditions, like
///< corrected immediately,
*< device errors or out of
///< such as a corrupted system
*< resources
NDB_MGM_CLUSTERLOG_ALL
=
7
///< All severities on
*/
NDB_MGM_CLUSTERLOG_ALERT
=
6
,
/*< A condition that should be
*< corrected immediately,
*< such as a corrupted system
*/
NDB_MGM_CLUSTERLOG_ALL
=
7
/*< All severities on*/
};
};
/**
/**
* Log categories
* Log categories
*/
*/
enum
ndb_mgm_event_category
{
enum
ndb_mgm_event_category
{
NDB_MGM_ILLEGAL_EVENT_CATEGORY
=
-
1
,
/
//
< Invalid
NDB_MGM_ILLEGAL_EVENT_CATEGORY
=
-
1
,
/
*
< Invalid
/**
/**
* Events during all kinds of startups
* Events during all kinds of startups
*/
*/
...
...
This diff is collapsed.
Click to expand it.
ndb/include/portlib/NdbCondition.h
View file @
c21b4754
...
@@ -26,21 +26,21 @@ extern "C" {
...
@@ -26,21 +26,21 @@ extern "C" {
struct
NdbCondition
;
struct
NdbCondition
;
/*
/*
*
//
Create a condition
*
Create a condition
//
*
//
* returnvalue: pointer to the condition structure
* returnvalue: pointer to the condition structure
*/
*/
struct
NdbCondition
*
NdbCondition_Create
(
void
);
struct
NdbCondition
*
NdbCondition_Create
(
void
);
/*
/*
*
//
Wait for a condition, allows a thread to wait for
*
Wait for a condition, allows a thread to wait for
//
a condition and atomically releases the associated mutex.
*
a condition and atomically releases the associated mutex.
//
*
//
* p_cond: pointer to the condition structure
* p_cond: pointer to the condition structure
//
* p_mutex: pointer to the mutex structure
* p_mutex: pointer to the mutex structure
//
* returnvalue: 0 = succeeded, 1 = failed
* returnvalue: 0 = succeeded, 1 = failed
*/
*/
int
NdbCondition_Wait
(
struct
NdbCondition
*
p_cond
,
int
NdbCondition_Wait
(
struct
NdbCondition
*
p_cond
,
NdbMutex
*
p_mutex
);
NdbMutex
*
p_mutex
);
...
@@ -60,29 +60,29 @@ NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
...
@@ -60,29 +60,29 @@ NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
int
msec
);
int
msec
);
/*
/*
*
//
Signal a condition
*
Signal a condition
//
*
//
* p_cond: pointer to the condition structure
* p_cond: pointer to the condition structure
//
* returnvalue: 0 = succeeded, 1 = failed
* returnvalue: 0 = succeeded, 1 = failed
*/
*/
int
NdbCondition_Signal
(
struct
NdbCondition
*
p_cond
);
int
NdbCondition_Signal
(
struct
NdbCondition
*
p_cond
);
/*
/*
*
//
Broadcast a condition
*
Broadcast a condition
//
*
//
* p_cond: pointer to the condition structure
* p_cond: pointer to the condition structure
//
* returnvalue: 0 = succeeded, 1 = failed
* returnvalue: 0 = succeeded, 1 = failed
*/
*/
int
NdbCondition_Broadcast
(
struct
NdbCondition
*
p_cond
);
int
NdbCondition_Broadcast
(
struct
NdbCondition
*
p_cond
);
/*
/*
*
//
Destroy a condition
*
Destroy a condition
//
*
//
* p_cond: pointer to the condition structure
* p_cond: pointer to the condition structure
//
* returnvalue: 0 = succeeded, 1 = failed
* returnvalue: 0 = succeeded, 1 = failed
*/
*/
int
NdbCondition_Destroy
(
struct
NdbCondition
*
p_cond
);
int
NdbCondition_Destroy
(
struct
NdbCondition
*
p_cond
);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
ndb/include/portlib/PortDefs.h
View file @
c21b4754
...
@@ -28,35 +28,35 @@
...
@@ -28,35 +28,35 @@
struct
tms
struct
tms
{
{
time_t
tms_utime
;
// user time
time_t
tms_utime
;
/* user time */
time_t
tms_stime
;
// system time
time_t
tms_stime
;
/* system time */
time_t
tms_cutime
;
// user time of children
time_t
tms_cutime
;
/* user time of children */
time_t
tms_cstime
;
// system time of children
time_t
tms_cstime
;
/* system time of children */
};
};
struct
timespec
struct
timespec
{
{
long
tv_sec
;
// Seconds
long
tv_sec
;
/* Seconds */
long
tv_nsec
;
// Nanoseconds
long
tv_nsec
;
/* Nanoseconds */
};
};
#define strcasecmp(a,b) _strcmpi(a,b)
#define strcasecmp(a,b) _strcmpi(a,b)
// Exports a WIN32 getopt function
/* Exports a WIN32 getopt function */
extern
int
optind
;
extern
int
optind
;
extern
char
*
optarg
;
extern
char
*
optarg
;
int
getopt
(
int
,
char
**
,
char
*
opts
);
int
getopt
(
int
,
char
**
,
char
*
opts
);
#endif /
/ NDB_WIN32
#endif
/
* NDB_WIN32 */
#ifdef NDB_ALPHA
#ifdef NDB_ALPHA
#ifdef NDB_GCC /
/ only for NDB_ALPHA
#ifdef NDB_GCC
/
* only for NDB_ALPHA */
extern
int
gnuShouldNotUseRPCC
();
extern
int
gnuShouldNotUseRPCC
();
#define RPCC() gnuShouldNotUseRPCC();
#define RPCC() gnuShouldNotUseRPCC();
#else
#else
#ifdef NDB_WIN32
#ifdef NDB_WIN32
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif /
/__cplusplus
#endif
/
* __cplusplus */
u_int64
__asm
(
char
*
,
...);
u_int64
__asm
(
char
*
,
...);
double
__dasm
(
char
*
,
...);
double
__dasm
(
char
*
,
...);
float
__fasm
(
char
*
,
...);
float
__fasm
(
char
*
,
...);
...
@@ -65,32 +65,32 @@ extern "C" {
...
@@ -65,32 +65,32 @@ extern "C" {
int
__ADD_ATOMIC_LONG2
(
void
*
,
int
);
int
__ADD_ATOMIC_LONG2
(
void
*
,
int
);
#ifdef __cplusplus
#ifdef __cplusplus
};
};
#endif /
/__cplusplus
#endif
/
* __cplusplus */
#pragma intrinsic (__asm, __dasm, __fasm)
#pragma intrinsic (__asm, __dasm, __fasm)
#pragma intrinsic(_ReleaseSpinLock, _AcquireSpinLock)
#pragma intrinsic(_ReleaseSpinLock, _AcquireSpinLock)
#pragma intrinsic(__ADD_ATOMIC_LONG2)
#pragma intrinsic(__ADD_ATOMIC_LONG2)
#endif /
/ NDB_WIN32
#endif
/
* NDB_WIN32 */
#define RPCC() ((int)__asm(" rpcc v0;"))
#define RPCC() ((int)__asm(" rpcc v0;"))
#define MB() __asm(" mb;");
#define MB() __asm(" mb;");
#define WMB() __asm(" wmb;");
#define WMB() __asm(" wmb;");
#ifdef USE_INITIALSP
#ifdef USE_INITIALSP
#define IS_IP() (__asm(" mov sp,v0;") < IPinitialSP)
#define IS_IP() (__asm(" mov sp,v0;") < IPinitialSP)
#else /
/ USE_INITIALSP
#else
/
* USE_INITIALSP */
#define IS_IP() (((__asm(" rpcc v0;") >> 32) & 0x7) == IP_CPU)
#define IS_IP() (((__asm(" rpcc v0;") >> 32) & 0x7) == IP_CPU)
#endif
#endif
#endif /
/NDB_GCC
#endif
/
* NDB_GCC */
#else /
/ NDB_ALPHA
#else
/
* NDB_ALPHA */
#if defined NDB_SPARC
#if defined NDB_SPARC
#define MB() asm ("membar 0x0;"); /
/ LoadLoad
#define MB() asm ("membar 0x0;");
/
* LoadLoad */
#define WMB() asm ("membar 0x3;"); /
/ StoreStore
#define WMB() asm ("membar 0x3;");
/
* StoreStore */
#else /
/ NDB_SPARC
#else
/
* NDB_SPARC */
#define MB()
#define MB()
#define WMB()
#define WMB()
#endif /
/ NDB_SPARC
#endif
/
* NDB_SPARC */
#define IS_IP() (1==1)
#define IS_IP() (1==1)
extern
int
shouldNotUseRPCC
();
extern
int
shouldNotUseRPCC
();
#define RPCC() shouldNotUseRPCC();
#define RPCC() shouldNotUseRPCC();
#endif /
/ NDB_ALPHA
#endif
/
* NDB_ALPHA */
#endif
#endif
This diff is collapsed.
Click to expand it.
ndb/include/portlib/prefetch.h
View file @
c21b4754
...
@@ -42,7 +42,7 @@ inline void prefetch(void* p)
...
@@ -42,7 +42,7 @@ inline void prefetch(void* p)
{
{
#ifdef NDB_ALPHA
#ifdef NDB_ALPHA
__asm
(
" ldl r31,0(a0);"
,
p
);
__asm
(
" ldl r31,0(a0);"
,
p
);
#endif /
/ NDB_ALPHA
#endif
/
* NDB_ALPHA */
#ifdef NDB_FORTE6
#ifdef NDB_FORTE6
sparc_prefetch_read_once
(
p
);
sparc_prefetch_read_once
(
p
);
#else
#else
...
@@ -54,7 +54,7 @@ inline void writehint(void* p)
...
@@ -54,7 +54,7 @@ inline void writehint(void* p)
{
{
#ifdef NDB_ALPHA
#ifdef NDB_ALPHA
__asm
(
" wh64 (a0);"
,
p
);
__asm
(
" wh64 (a0);"
,
p
);
#endif /
/ NDB_ALPHA
#endif
/
* NDB_ALPHA */
#ifdef NDB_FORTE6
#ifdef NDB_FORTE6
sparc_prefetch_write_once
(
p
);
sparc_prefetch_write_once
(
p
);
#else
#else
...
...
This diff is collapsed.
Click to expand it.
ndb/src/common/portlib/NdbDaemon.c
View file @
c21b4754
...
@@ -28,7 +28,7 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
...
@@ -28,7 +28,7 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
int
lockfd
=
-
1
,
logfd
=
-
1
,
n
;
int
lockfd
=
-
1
,
logfd
=
-
1
,
n
;
char
buf
[
64
];
char
buf
[
64
];
(
void
)
flags
;
/
/ remove warning for unused parameter
(
void
)
flags
;
/
* remove warning for unused parameter */
/* Check that we have write access to lock file */
/* Check that we have write access to lock file */
assert
(
lockfile
!=
NULL
);
assert
(
lockfile
!=
NULL
);
...
...
This diff is collapsed.
Click to expand it.
ndb/src/common/portlib/NdbMem.c
View file @
c21b4754
...
@@ -42,7 +42,7 @@ void* NdbMem_Allocate(size_t size)
...
@@ -42,7 +42,7 @@ void* NdbMem_Allocate(size_t size)
void
*
NdbMem_AllocateAlign
(
size_t
size
,
size_t
alignment
)
void
*
NdbMem_AllocateAlign
(
size_t
size
,
size_t
alignment
)
{
{
(
void
)
alignment
;
/
/ remove warning for unused parameter
(
void
)
alignment
;
/
* remove warning for unused parameter */
/*
/*
return (void*)memalign(alignment, size);
return (void*)memalign(alignment, size);
TEMP fix
TEMP fix
...
...
This diff is collapsed.
Click to expand it.
ndb/src/common/portlib/NdbThread.c
View file @
c21b4754
...
@@ -42,7 +42,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
...
@@ -42,7 +42,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
int
result
;
int
result
;
pthread_attr_t
thread_attr
;
pthread_attr_t
thread_attr
;
(
void
)
thread_prio
;
/
/ remove warning for unused parameter
(
void
)
thread_prio
;
/
* remove warning for unused parameter */
if
(
p_thread_func
==
NULL
)
if
(
p_thread_func
==
NULL
)
return
0
;
return
0
;
...
@@ -110,7 +110,7 @@ int NdbThread_SetConcurrencyLevel(int level)
...
@@ -110,7 +110,7 @@ int NdbThread_SetConcurrencyLevel(int level)
#ifdef USE_PTHREAD_EXTRAS
#ifdef USE_PTHREAD_EXTRAS
return
pthread_setconcurrency
(
level
);
return
pthread_setconcurrency
(
level
);
#else
#else
(
void
)
level
;
/
/ remove warning for unused parameter
(
void
)
level
;
/
* remove warning for unused parameter */
return
0
;
return
0
;
#endif
#endif
}
}
This diff is collapsed.
Click to expand it.
ndb/src/common/portlib/memtest.c
View file @
c21b4754
...
@@ -90,7 +90,7 @@ void malloctest(int loopcount, int memsize, int touch) {
...
@@ -90,7 +90,7 @@ void malloctest(int loopcount, int memsize, int touch) {
long
long
start
=
0
;
long
long
start
=
0
;
int
total
=
0
;
int
total
=
0
;
int
i
=
0
,
j
=
0
;
int
i
=
0
,
j
=
0
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
float
mean
;
char
*
ptr
=
0
;
char
*
ptr
=
0
;
...
@@ -126,7 +126,7 @@ void mmaptest(int loopcount, int memsize, int touch) {
...
@@ -126,7 +126,7 @@ void mmaptest(int loopcount, int memsize, int touch) {
int
total
=
0
;
int
total
=
0
;
int
i
=
0
,
j
=
0
;
int
i
=
0
,
j
=
0
;
char
*
ptr
;
char
*
ptr
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
float
mean
;
printf
(
"Staring mmaptest "
);
printf
(
"Staring mmaptest "
);
...
@@ -165,7 +165,7 @@ void unmaptest(loopcount, memsize)
...
@@ -165,7 +165,7 @@ void unmaptest(loopcount, memsize)
int
total
=
0
;
int
total
=
0
;
int
i
=
0
,
j
=
0
;
int
i
=
0
,
j
=
0
;
char
*
ptr
;
char
*
ptr
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
float
mean
;
printf
(
"Staring munmap test (loopcount = 1 no matter what you prev. set)
\n
"
);
printf
(
"Staring munmap test (loopcount = 1 no matter what you prev. set)
\n
"
);
...
@@ -215,7 +215,7 @@ void freetest(int loopcount, int memsize) {
...
@@ -215,7 +215,7 @@ void freetest(int loopcount, int memsize) {
long
long
start
=
0
;
long
long
start
=
0
;
int
total
=
0
;
int
total
=
0
;
int
i
=
0
,
j
=
0
;
int
i
=
0
,
j
=
0
;
int
size
=
memsize
*
1024
*
1024
;
/
/bytes
;
int
size
=
memsize
*
1024
*
1024
;
/
*bytes*/
;
float
mean
;
float
mean
;
char
*
ptr
=
0
;
char
*
ptr
=
0
;
...
...
This diff is collapsed.
Click to expand it.
ndb/src/common/util/basestring_vsnprintf.c
View file @
c21b4754
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/
/ define on IRIX to get posix compliant vsnprintf
/
* define on IRIX to get posix compliant vsnprintf */
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <stdio.h>
#include <basestring_vsnprintf.h>
#include <basestring_vsnprintf.h>
...
...
This diff is collapsed.
Click to expand it.
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