~mingqiangzhuang/libmemcached/icc-memslap

« back to all changes in this revision

Viewing changes to clients/ms_thread.c

  • Committer: Brian Aker
  • Date: 2010-01-19 04:59:05 UTC
  • mfrom: (753.1.1 libmemcached)
  • Revision ID: brian@gaz-20100119045905-e6vjp6lcp0b7bymi
Merge memslap

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
 */
245
245
static void *ms_worker_libevent(void *arg)
246
246
{
247
 
  ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key);
 
247
  ms_thread_t *ms_thread= NULL;
248
248
  ms_thread_ctx_t *thread_ctx= (ms_thread_ctx_t *)arg;
249
249
 
250
250
  /**
264
264
  /* each thread with a timer */
265
265
  ms_clock_handler(0, 0, 0);
266
266
 
 
267
  pthread_mutex_lock(&ms_global.init_lock.lock);
 
268
  ms_global.init_lock.count++;
 
269
  pthread_cond_signal(&ms_global.init_lock.cond);
 
270
  pthread_mutex_unlock(&ms_global.init_lock.lock);
 
271
 
 
272
  ms_thread= pthread_getspecific(ms_thread_key);
267
273
  event_base_loop(ms_thread->base, 0);
268
274
 
269
275
  return NULL;