~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_pthread.h

  • Committer: Brian Aker
  • Date: 2008-09-27 22:43:08 UTC
  • Revision ID: brian@tangent.org-20080927224308-5h8al9f9wtsdtu7v
Removed legacy bits around enum.

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
{
249
249
  pthread_mutex_t global,mutex;
250
250
  const char *file;
251
 
  uint line,count;
 
251
  uint32_t line,count;
252
252
  pthread_t thread;
253
253
} safe_mutex_t;
254
254
 
255
255
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
256
 
                    const char *file, uint line);
257
 
int safe_mutex_lock(safe_mutex_t *mp, bool try_lock, const char *file, uint line);
258
 
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
259
 
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
 
256
                    const char *file, uint32_t line);
 
257
int safe_mutex_lock(safe_mutex_t *mp, bool try_lock, const char *file, uint32_t line);
 
258
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint32_t line);
 
259
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint32_t line);
260
260
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
261
 
                   uint line);
 
261
                   uint32_t line);
262
262
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
263
 
                        struct timespec *abstime, const char *file, uint line);
 
263
                        struct timespec *abstime, const char *file, uint32_t line);
264
264
void safe_mutex_global_init(void);
265
265
void safe_mutex_end(FILE *file);
266
266
 
272
272
typedef struct st_my_pthread_fastmutex_t
273
273
{
274
274
  pthread_mutex_t mutex;
275
 
  uint spins;
 
275
  uint32_t spins;
276
276
} my_pthread_fastmutex_t;
277
277
void fastmutex_global_init(void);
278
278
 
426
426
};
427
427
 
428
428
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
429
 
extern uint my_thread_end_wait_time;
 
429
extern uint32_t my_thread_end_wait_time;
430
430
#define my_thread_var (_my_thread_var())
431
431
/*
432
432
  Keep track of shutdown,signal, and main threads so that my_end() will not
439
439
#define THD_LIB_NPTL  2
440
440
#define THD_LIB_LT    4
441
441
 
442
 
extern uint thd_lib_detected;
 
442
extern uint32_t thd_lib_detected;
443
443
 
444
444
/*
445
445
  thread_safe_xxx functions are for critical statistic or counters.