Commit 76b09dd5 authored by unknown's avatar unknown

fix c++ style comments in .h and .c files

compilation problems on some platforms'

parent 25f1344f
...@@ -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
......
...@@ -78,7 +78,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -78,7 +78,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_SCAN_NEXTREQ 28 #define GSN_SCAN_NEXTREQ 28
#define GSN_SCAN_TABCONF 29 #define GSN_SCAN_TABCONF 29
// 30 unused /* 30 unused */
#define GSN_SCAN_TABREF 31 #define GSN_SCAN_TABREF 31
#define GSN_SCAN_TABREQ 32 #define GSN_SCAN_TABREQ 32
#define GSN_KEYINFO20 33 #define GSN_KEYINFO20 33
...@@ -91,42 +91,42 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -91,42 +91,42 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_TCSEIZEREF 38 #define GSN_TCSEIZEREF 38
#define GSN_TCSEIZEREQ 39 #define GSN_TCSEIZEREQ 39
// 40 unused /* 40 unused */
// 41 unused /* 41 unused */
// 42 unused /* 42 unused */
// 43 unused /* 43 unused */
// 44 unused /* 44 unused */
// 45 unused /* 45 unused */
// 46 unused /* 46 unused */
// 47 unused /* 47 unused */
// 48 unused /* 48 unused */
// 49 unused /* 49 unused */
// 50 unused /* 50 unused */
// 51 unused /* 51 unused */
// 52 unused /* 52 unused */
// 53 unused /* 53 unused */
// 54 unused /* 54 unused */
// 55 unused /* 55 unused */
// 56 unused /* 56 unused */
// 57 unused /* 57 unused */
// 58 unused /* 58 unused */
// 59 unused /* 59 unused */
// 60 unused /* 60 unused */
// 61 unused /* 61 unused */
// 62 unused /* 62 unused */
// 63 unused /* 63 unused */
// 64 unused /* 64 unused */
// 65 unused /* 65 unused */
// 66 unused /* 66 unused */
/** /**
* These are used only by kernel * These are used only by kernel
*/ */
#define GSN_ACC_ABORTCONF 67 #define GSN_ACC_ABORTCONF 67
// 68 unused /* 68 unused */
// 69 unused /* 69 unused */
// 70 unused /* 70 unused */
#define GSN_ACC_ABORTREQ 71 #define GSN_ACC_ABORTREQ 71
#define GSN_ACC_CHECK_SCAN 72 #define GSN_ACC_CHECK_SCAN 72
#define GSN_ACC_COMMITCONF 73 #define GSN_ACC_COMMITCONF 73
...@@ -172,42 +172,42 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -172,42 +172,42 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_API_FAILCONF 113 #define GSN_API_FAILCONF 113
#define GSN_API_FAILREQ 114 #define GSN_API_FAILREQ 114
#define GSN_CNTR_START_REQ 115 #define GSN_CNTR_START_REQ 115
// 116 not unused /* 116 not unused */
#define GSN_CNTR_START_REF 117 #define GSN_CNTR_START_REF 117
#define GSN_CNTR_START_CONF 118 #define GSN_CNTR_START_CONF 118
#define GSN_CNTR_START_REP 119 #define GSN_CNTR_START_REP 119
// 120 unused /* 120 unused */
// 121 unused /* 121 unused */
// 122 unused /* 122 unused */
// 123 unused /* 123 unused */
// 124 unused /* 124 unused */
#define GSN_CHECK_LCP_STOP 125 #define GSN_CHECK_LCP_STOP 125
#define GSN_CLOSE_COMCONF 126 // local #define GSN_CLOSE_COMCONF 126 /* local */
#define GSN_CLOSE_COMREQ 127 // local #define GSN_CLOSE_COMREQ 127 /* local */
#define GSN_CM_ACKADD 128 // distr. #define GSN_CM_ACKADD 128 /* distr. */
// 129 unused /* 129 unused */
#define GSN_CM_ADD 130 // distr. #define GSN_CM_ADD 130 /* distr. */
// 131 unused /* 131 unused */
// 132 not unused /* 132 not unused */
// 133 not unused /* 133 not unused */
#define GSN_CM_HEARTBEAT 134 // distr. #define GSN_CM_HEARTBEAT 134 /* distr. */
// 135 unused /* 135 unused */
// 136 unused /* 136 unused */
// 137 unused /* 137 unused */
#define GSN_CM_NODEINFOCONF 138 // distr. #define GSN_CM_NODEINFOCONF 138 /* distr. */
#define GSN_CM_NODEINFOREF 139 // distr. #define GSN_CM_NODEINFOREF 139 /* distr. */
#define GSN_CM_NODEINFOREQ 140 // distr. #define GSN_CM_NODEINFOREQ 140 /* distr. */
#define GSN_CM_REGCONF 141 // distr. #define GSN_CM_REGCONF 141 /* distr. */
#define GSN_CM_REGREF 142 // distr. #define GSN_CM_REGREF 142 /* distr. */
#define GSN_CM_REGREQ 143 // distr. #define GSN_CM_REGREQ 143 /* distr. */
// 144 unused /* 144 unused */
// 145 unused /* 145 unused */
// 146 unused /* 146 unused */
#define GSN_CM_ADD_REP 147 // local #define GSN_CM_ADD_REP 147 /* local */
// 148 unused /* 148 unused */
// 149 unused /* 149 unused */
// 150 unused /* 150 unused */
#define GSN_CNTR_WAITREP 151 // distr. #define GSN_CNTR_WAITREP 151 /* distr. */
#define GSN_COMMIT 152 #define GSN_COMMIT 152
#define GSN_COMMIT_FAILCONF 153 #define GSN_COMMIT_FAILCONF 153
#define GSN_COMMIT_FAILREQ 154 #define GSN_COMMIT_FAILREQ 154
...@@ -220,7 +220,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -220,7 +220,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_COMPLETEREQ 162 #define GSN_COMPLETEREQ 162
#define GSN_CONNECT_REP 163 #define GSN_CONNECT_REP 163
#define GSN_CONTINUEB 164 #define GSN_CONTINUEB 164
// 165 not unused /* 165 not unused */
#define GSN_COPY_ACTIVECONF 166 #define GSN_COPY_ACTIVECONF 166
#define GSN_COPY_ACTIVEREF 167 #define GSN_COPY_ACTIVEREF 167
#define GSN_COPY_ACTIVEREQ 168 #define GSN_COPY_ACTIVEREQ 168
...@@ -243,9 +243,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -243,9 +243,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_DIADDTABCONF 185 #define GSN_DIADDTABCONF 185
#define GSN_DIADDTABREF 186 #define GSN_DIADDTABREF 186
#define GSN_DIADDTABREQ 187 #define GSN_DIADDTABREQ 187
// 188 not unused /* 188 not unused */
// 189 not unused /* 189 not unused */
// 190 not unused /* 190 not unused */
#define GSN_DICTSTARTCONF 191 #define GSN_DICTSTARTCONF 191
#define GSN_DICTSTARTREQ 192 #define GSN_DICTSTARTREQ 192
...@@ -301,9 +301,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -301,9 +301,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_DIH_RESTARTREF 218 #define GSN_DIH_RESTARTREF 218
#define GSN_DIH_RESTARTREQ 219 #define GSN_DIH_RESTARTREQ 219
// 220 not unused /* 220 not unused */
// 221 not unused /* 221 not unused */
// 222 not unused /* 222 not unused */
#define GSN_EMPTY_LCP_REQ 223 #define GSN_EMPTY_LCP_REQ 223
#define GSN_EMPTY_LCP_CONF 224 #define GSN_EMPTY_LCP_CONF 224
...@@ -315,8 +315,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -315,8 +315,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_MASTER_GCPREF 228 #define GSN_MASTER_GCPREF 228
#define GSN_MASTER_GCPREQ 229 #define GSN_MASTER_GCPREQ 229
// 230 not unused /* 230 not unused */
// 231 not unused /* 231 not unused */
#define GSN_DIRELEASECONF 232 #define GSN_DIRELEASECONF 232
#define GSN_DIRELEASEREF 233 #define GSN_DIRELEASEREF 233
...@@ -388,8 +388,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -388,8 +388,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_LCP_HOLDOPREQ 299 #define GSN_LCP_HOLDOPREQ 299
#define GSN_SHRINKCHECK2 301 #define GSN_SHRINKCHECK2 301
#define GSN_GET_SCHEMA_INFOREQ 302 #define GSN_GET_SCHEMA_INFOREQ 302
// 303 not unused /* 303 not unused */
// 304 not unused /* 304 not unused */
#define GSN_LQH_RESTART_OP 305 #define GSN_LQH_RESTART_OP 305
#define GSN_LQH_TRANSCONF 306 #define GSN_LQH_TRANSCONF 306
#define GSN_LQH_TRANSREQ 307 #define GSN_LQH_TRANSREQ 307
...@@ -421,12 +421,12 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -421,12 +421,12 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_NEXT_SCANREQ 332 #define GSN_NEXT_SCANREQ 332
#define GSN_NEXTOPERATION 333 #define GSN_NEXTOPERATION 333
#define GSN_READ_CONFIG_REQ 334 // new name for sizealt, local #define GSN_READ_CONFIG_REQ 334 /* new name for sizealt, local */
#define GSN_READ_CONFIG_CONF 335 // new name for sizealt, local #define GSN_READ_CONFIG_CONF 335 /* new name for sizealt, local */
// 336 unused /* 336 unused */
// 337 unused /* 337 unused */
// 338 unused /* 338 unused */
#define GSN_OPEN_COMCONF 339 #define GSN_OPEN_COMCONF 339
#define GSN_OPEN_COMREF 340 #define GSN_OPEN_COMREF 340
#define GSN_OPEN_COMREQ 341 #define GSN_OPEN_COMREQ 341
...@@ -452,7 +452,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -452,7 +452,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_TUP_ALLOCREQ 360 #define GSN_TUP_ALLOCREQ 360
#define GSN_TUP_DEALLOCREQ 361 #define GSN_TUP_DEALLOCREQ 361
// 362 not unused /* 362 not unused */
#define GSN_TUP_WRITELOG_REQ 363 #define GSN_TUP_WRITELOG_REQ 363
#define GSN_LQH_WRITELOG_REQ 364 #define GSN_LQH_WRITELOG_REQ 364
...@@ -507,16 +507,16 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -507,16 +507,16 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_TEST_ORD 407 #define GSN_TEST_ORD 407
#define GSN_TESTSIG 408 #define GSN_TESTSIG 408
#define GSN_TIME_SIGNAL 409 #define GSN_TIME_SIGNAL 409
// 410 unused /* 410 unused */
// 411 unused /* 411 unused */
// 412 unused /* 412 unused */
#define GSN_TUP_ABORTREQ 414 #define GSN_TUP_ABORTREQ 414
#define GSN_TUP_ADD_ATTCONF 415 #define GSN_TUP_ADD_ATTCONF 415
#define GSN_TUP_ADD_ATTRREF 416 #define GSN_TUP_ADD_ATTRREF 416
#define GSN_TUP_ADD_ATTRREQ 417 #define GSN_TUP_ADD_ATTRREQ 417
#define GSN_TUP_ATTRINFO 418 #define GSN_TUP_ATTRINFO 418
#define GSN_TUP_COMMITREQ 419 #define GSN_TUP_COMMITREQ 419
// 420 unused /* 420 unused */
#define GSN_TUP_LCPCONF 421 #define GSN_TUP_LCPCONF 421
#define GSN_TUP_LCPREF 422 #define GSN_TUP_LCPREF 422
#define GSN_TUP_LCPREQ 423 #define GSN_TUP_LCPREQ 423
...@@ -553,8 +553,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -553,8 +553,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_STATISTICS_CONF 454 #define GSN_STATISTICS_CONF 454
#define GSN_START_ORD 455 #define GSN_START_ORD 455
// 456 unused /* 456 unused */
// 457 unused /* 457 unused */
#define GSN_EVENT_SUBSCRIBE_REQ 458 #define GSN_EVENT_SUBSCRIBE_REQ 458
#define GSN_EVENT_SUBSCRIBE_CONF 459 #define GSN_EVENT_SUBSCRIBE_CONF 459
...@@ -576,7 +576,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -576,7 +576,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_CHECKNODEGROUPSREQ 471 #define GSN_CHECKNODEGROUPSREQ 471
#define GSN_CHECKNODEGROUPSCONF 472 #define GSN_CHECKNODEGROUPSCONF 472
// 473 unused /* 473 unused */
#define GSN_ARBIT_PREPREQ 474 #define GSN_ARBIT_PREPREQ 474
#define GSN_ARBIT_PREPCONF 475 #define GSN_ARBIT_PREPCONF 475
#define GSN_ARBIT_PREPREF 476 #define GSN_ARBIT_PREPREF 476
...@@ -612,7 +612,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -612,7 +612,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_WAIT_GCP_REF 500 #define GSN_WAIT_GCP_REF 500
#define GSN_WAIT_GCP_CONF 501 #define GSN_WAIT_GCP_CONF 501
// 502 not used /* 502 not used */
/** /**
* Trigger and index signals * Trigger and index signals
...@@ -732,7 +732,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -732,7 +732,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_SUB_STOP_REQ 572 #define GSN_SUB_STOP_REQ 572
#define GSN_SUB_STOP_REF 573 #define GSN_SUB_STOP_REF 573
#define GSN_SUB_STOP_CONF 574 #define GSN_SUB_STOP_CONF 574
// 575 unused /* 575 unused */
#define GSN_SUB_CREATE_REQ 576 #define GSN_SUB_CREATE_REQ 576
#define GSN_SUB_CREATE_REF 577 #define GSN_SUB_CREATE_REF 577
#define GSN_SUB_CREATE_CONF 578 #define GSN_SUB_CREATE_CONF 578
...@@ -832,7 +832,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -832,7 +832,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_GREP_REMOVE_REF 654 #define GSN_GREP_REMOVE_REF 654
#define GSN_GREP_REMOVE_CONF 655 #define GSN_GREP_REMOVE_CONF 655
// Start Global Replication /* Start Global Replication */
#define GSN_GREP_REQ 656 #define GSN_GREP_REQ 656
/** /**
...@@ -891,8 +891,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -891,8 +891,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_TUX_MAINT_CONF 678 #define GSN_TUX_MAINT_CONF 678
#define GSN_TUX_MAINT_REF 679 #define GSN_TUX_MAINT_REF 679
// not used 680 /* not used 680 */
// not used 681 /* not used 681 */
/** /**
* from mgmtsrvr to NDBCNTR * from mgmtsrvr to NDBCNTR
...@@ -903,10 +903,10 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -903,10 +903,10 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_API_VERSION_REQ 697 #define GSN_API_VERSION_REQ 697
#define GSN_API_VERSION_CONF 698 #define GSN_API_VERSION_CONF 698
// not used 686 /* not used 686 */
// not used 687 /* not used 687 */
// not used 689 /* not used 689 */
// not used 690 /* not used 690 */
/** /**
* SUMA restart protocol * SUMA restart protocol
...@@ -915,9 +915,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; ...@@ -915,9 +915,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_SUMA_HANDOVER_REQ 692 #define GSN_SUMA_HANDOVER_REQ 692
#define GSN_SUMA_HANDOVER_CONF 693 #define GSN_SUMA_HANDOVER_CONF 693
// not used 694 /* not used 694 */
// not used 695 /* not used 695 */
// not used 696 /* not used 696 */
/** /**
* GREP restart protocol * GREP restart protocol
......
...@@ -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
...@@ -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 */
}; };
}; };
......
...@@ -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 management server node (MGM)*/ NDB_MGM_NODE_TYPE_MGM = NODE_TYPE_MGM,/*< A mgmt 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
*/ */
......
...@@ -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
......
...@@ -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
...@@ -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
......
...@@ -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);
......
...@@ -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
......
...@@ -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
} }
...@@ -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;
......
...@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment