~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/my_pthread.h

  • Committer: Stewart Smith
  • Date: 2008-06-30 05:43:45 UTC
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: stewart@flamingspork.com-20080630054345-drcljfrjinqmut2h
my_errno => errno

saves sizeof(int) per thread + sizeof(int) in RAM usage!

even seems to kinda work!

breaks build with dbug library for some strange reason.

Show diffs side-by-side

added added

removed removed

Lines of Context:
412
412
 
413
413
struct st_my_thread_var
414
414
{
415
 
  int thr_errno;
416
415
  pthread_cond_t suspend;
417
416
  pthread_mutex_t mutex;
418
417
  pthread_mutex_t * volatile current_mutex;
433
432
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
434
433
extern uint my_thread_end_wait_time;
435
434
#define my_thread_var (_my_thread_var())
436
 
#define my_errno my_thread_var->thr_errno
437
435
/*
438
436
  Keep track of shutdown,signal, and main threads so that my_end() will not
439
437
  report errors with them