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

compilation problems on some platforms'
This commit is contained in:
unknown 2004-10-22 11:59:57 +00:00
commit 76b09dd518
13 changed files with 252 additions and 242 deletions

View file

@ -26,21 +26,21 @@ extern "C" {
struct NdbCondition;
/*
// Create a condition
//
// * returnvalue: pointer to the condition structure
*/
/**
* Create a condition
*
* returnvalue: pointer to the condition structure
*/
struct NdbCondition* NdbCondition_Create(void);
/*
// Wait for a condition, allows a thread to wait for
// a condition and atomically releases the associated mutex.
//
// * p_cond: pointer to the condition structure
// * p_mutex: pointer to the mutex structure
// * returnvalue: 0 = succeeded, 1 = failed
*/
/**
* Wait for a condition, allows a thread to wait for
* a condition and atomically releases the associated mutex.
*
* p_cond: pointer to the condition structure
* p_mutex: pointer to the mutex structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int NdbCondition_Wait(struct NdbCondition* p_cond,
NdbMutex* p_mutex);
@ -60,29 +60,29 @@ NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
int msec);
/*
// Signal a condition
//
// * p_cond: pointer to the condition structure
// * returnvalue: 0 = succeeded, 1 = failed
*/
/**
* Signal a condition
*
* p_cond: pointer to the condition structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int NdbCondition_Signal(struct NdbCondition* p_cond);
/*
// Broadcast a condition
//
// * p_cond: pointer to the condition structure
// * returnvalue: 0 = succeeded, 1 = failed
*/
/**
* Broadcast a condition
*
* p_cond: pointer to the condition structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int NdbCondition_Broadcast(struct NdbCondition* p_cond);
/*
// Destroy a condition
//
// * p_cond: pointer to the condition structure
// * returnvalue: 0 = succeeded, 1 = failed
*/
/**
* Destroy a condition
*
* p_cond: pointer to the condition structure
* returnvalue: 0 = succeeded, 1 = failed
*/
int NdbCondition_Destroy(struct NdbCondition* p_cond);
#ifdef __cplusplus

View file

@ -28,35 +28,35 @@
struct tms
{
time_t tms_utime; // user time
time_t tms_stime; // system time
time_t tms_cutime; // user time of children
time_t tms_cstime; // system time of children
time_t tms_utime; /* user time */
time_t tms_stime; /* system time */
time_t tms_cutime; /* user time of children */
time_t tms_cstime; /* system time of children */
};
struct timespec
{
long tv_sec; // Seconds
long tv_nsec; // Nanoseconds
long tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
#define strcasecmp(a,b) _strcmpi(a,b)
// Exports a WIN32 getopt function
/* Exports a WIN32 getopt function */
extern int optind;
extern char *optarg;
int getopt(int, char **, char *opts);
#endif // NDB_WIN32
#endif /* NDB_WIN32 */
#ifdef NDB_ALPHA
#ifdef NDB_GCC // only for NDB_ALPHA
#ifdef NDB_GCC /* only for NDB_ALPHA */
extern int gnuShouldNotUseRPCC();
#define RPCC() gnuShouldNotUseRPCC();
#else
#ifdef NDB_WIN32
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
u_int64 __asm(char *, ...);
double __dasm(char *, ...);
float __fasm(char *, ...);
@ -65,32 +65,32 @@ extern "C" {
int __ADD_ATOMIC_LONG2(void *, int);
#ifdef __cplusplus
};
#endif //__cplusplus
#endif /* __cplusplus */
#pragma intrinsic (__asm, __dasm, __fasm)
#pragma intrinsic(_ReleaseSpinLock, _AcquireSpinLock)
#pragma intrinsic(__ADD_ATOMIC_LONG2)
#endif // NDB_WIN32
#endif /* NDB_WIN32 */
#define RPCC() ((int)__asm(" rpcc v0;"))
#define MB() __asm(" mb;");
#define WMB() __asm(" wmb;");
#ifdef USE_INITIALSP
#define IS_IP() (__asm(" mov sp,v0;") < IPinitialSP)
#else // USE_INITIALSP
#else /* USE_INITIALSP */
#define IS_IP() (((__asm(" rpcc v0;") >> 32) & 0x7) == IP_CPU)
#endif
#endif //NDB_GCC
#else // NDB_ALPHA
#endif /* NDB_GCC */
#else /* NDB_ALPHA */
#if defined NDB_SPARC
#define MB() asm ("membar 0x0;"); // LoadLoad
#define WMB() asm ("membar 0x3;"); // StoreStore
#else // NDB_SPARC
#define MB() asm ("membar 0x0;"); /* LoadLoad */
#define WMB() asm ("membar 0x3;"); /* StoreStore */
#else /* NDB_SPARC */
#define MB()
#define WMB()
#endif // NDB_SPARC
#endif /* NDB_SPARC */
#define IS_IP() (1==1)
extern int shouldNotUseRPCC();
#define RPCC() shouldNotUseRPCC();
#endif // NDB_ALPHA
#endif /* NDB_ALPHA */
#endif

View file

@ -42,7 +42,7 @@ inline void prefetch(void* p)
{
#ifdef NDB_ALPHA
__asm(" ldl r31,0(a0);", p);
#endif // NDB_ALPHA
#endif /* NDB_ALPHA */
#ifdef NDB_FORTE6
sparc_prefetch_read_once(p);
#else
@ -54,7 +54,7 @@ inline void writehint(void* p)
{
#ifdef NDB_ALPHA
__asm(" wh64 (a0);", p);
#endif // NDB_ALPHA
#endif /* NDB_ALPHA */
#ifdef NDB_FORTE6
sparc_prefetch_write_once(p);
#else