~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_thr_init.cc

  • Committer: Eric Day
  • Date: 2009-10-31 21:53:33 UTC
  • mfrom: (1200 staging)
  • mto: This revision was merged to the branch mainline in revision 1202.
  • Revision ID: eday@oddments.org-20091031215333-j94bjoanwmi68p6f
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
48
48
pthread_mutexattr_t my_fast_mutexattr;
49
49
#endif
50
 
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
51
 
pthread_mutexattr_t my_errorcheck_mutexattr;
52
 
#endif
53
 
 
54
50
 
55
51
static uint32_t get_thread_lib(void);
56
52
 
90
86
  pthread_mutexattr_settype(&my_fast_mutexattr,
91
87
                            PTHREAD_MUTEX_ADAPTIVE_NP);
92
88
#endif
93
 
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
94
 
  /*
95
 
    Set mutex type to "errorcheck"
96
 
  */
97
 
  pthread_mutexattr_init(&my_errorcheck_mutexattr);
98
 
  pthread_mutexattr_settype(&my_errorcheck_mutexattr,
99
 
                            PTHREAD_MUTEX_ERRORCHECK);
100
 
#endif
101
89
 
102
90
  pthread_mutex_init(&THR_LOCK_lock,MY_MUTEX_INIT_FAST);
103
91
  pthread_mutex_init(&THR_LOCK_threads,MY_MUTEX_INIT_FAST);
143
131
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
144
132
  pthread_mutexattr_destroy(&my_fast_mutexattr);
145
133
#endif
146
 
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
147
 
  pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
148
 
#endif
149
134
  pthread_mutex_destroy(&THR_LOCK_lock);
150
135
  if (all_threads_killed)
151
136
  {