~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_thr_init.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
# else
35
35
#  include <time.h>
36
36
# endif
37
 
#endif  
 
37
#endif
38
38
 
39
39
uint32_t thd_lib_detected= 0;
40
40
 
45
45
#endif /* USE_TLS */
46
46
pthread_mutex_t THR_LOCK_open;
47
47
pthread_mutex_t THR_LOCK_lock;
48
 
pthread_mutex_t THR_LOCK_charset; 
49
 
pthread_mutex_t THR_LOCK_threads; 
 
48
pthread_mutex_t THR_LOCK_charset;
 
49
pthread_mutex_t THR_LOCK_threads;
50
50
pthread_mutex_t THR_LOCK_time;
51
51
pthread_cond_t  THR_COND_threads;
52
52
uint32_t            THR_thread_count= 0;
214
214
#ifdef EXTRA_DEBUG_THREADS
215
215
  fprintf(stderr,"my_thread_init(): thread_id: 0x%lx\n",
216
216
          (uint32_t) pthread_self());
217
 
#endif  
 
217
#endif
218
218
 
219
219
  if (pthread_getspecific(THR_KEY_mysys))
220
220
  {
221
221
#ifdef EXTRA_DEBUG_THREADS
222
222
    fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n",
223
223
            (long) pthread_self());
224
 
#endif    
 
224
#endif
225
225
    goto end;
226
226
  }
227
227
  if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
265
265
#ifdef EXTRA_DEBUG_THREADS
266
266
  fprintf(stderr,"my_thread_end(): tmp: 0x%lx  pthread_self: 0x%lx  thread_id: %ld\n",
267
267
          (long) tmp, (long) pthread_self(), tmp ? (long) tmp->id : 0L);
268
 
#endif  
 
268
#endif
269
269
  if (tmp && tmp->init)
270
270
  {
271
271
#if !defined(__bsdi__) && !defined(__OpenBSD__)
283
283
      Decrement counter for number of running threads. We are using this
284
284
      in my_thread_global_end() to wait until all threads have called
285
285
      my_thread_end and thus freed all memory they have allocated in
286
 
      my_thread_init() 
 
286
      my_thread_init()
287
287
    */
288
288
    pthread_mutex_lock(&THR_LOCK_threads);
289
289
    assert(THR_thread_count != 0);
325
325
{
326
326
#ifdef _CS_GNU_LIBPTHREAD_VERSION
327
327
  char buff[64];
328
 
    
 
328
 
329
329
  confstr(_CS_GNU_LIBPTHREAD_VERSION, buff, sizeof(buff));
330
330
 
331
331
  if (!strncasecmp(buff, "NPTL", 4))