diff options
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r-- | mysys/thr_alarm.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index b710a7eee39..9ab862fa755 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -97,10 +97,8 @@ void init_thr_alarm(uint max_alarms) pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS); pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); pthread_attr_setstacksize(&thr_attr,8196); - - my_pthread_attr_setprio(&thr_attr,100); /* Very high priority */ - VOID(pthread_create(&alarm_thread,&thr_attr,alarm_handler,NULL)); - VOID(pthread_attr_destroy(&thr_attr)); + pthread_create(&alarm_thread,&thr_attr,alarm_handler,NULL); + pthread_attr_destroy(&thr_attr); } #elif defined(USE_ONE_SIGNAL_HAND) pthread_sigmask(SIG_BLOCK, &s, NULL); /* used with sigwait() */ @@ -774,7 +772,7 @@ static void *test_thread(void *arg) break; continue; } - VOID(getchar()); /* Somebody was playing */ + (void) getchar(); /* Somebody was playing */ } } } @@ -786,7 +784,7 @@ static void *test_thread(void *arg) } pthread_mutex_lock(&LOCK_thread_count); thread_count--; - VOID(pthread_cond_signal(&COND_thread_count)); /* Tell main we are ready */ + pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */ pthread_mutex_unlock(&LOCK_thread_count); free((uchar*) arg); return 0; @@ -815,7 +813,7 @@ static void *signal_hand(void *arg __attribute__((unused))) pthread_detach_this_thread(); init_thr_alarm(10); /* Setup alarm handler */ pthread_mutex_lock(&LOCK_thread_count); /* Required by bsdi */ - VOID(pthread_cond_signal(&COND_thread_count)); /* Tell main we are ready */ + pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */ pthread_mutex_unlock(&LOCK_thread_count); sigemptyset(&set); /* Catch all signals */ @@ -906,7 +904,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) #ifdef NOT_USED sigemptyset(&set); sigaddset(&set, thr_client_alarm); - VOID(pthread_sigmask(SIG_UNBLOCK, &set, (sigset_t*) 0)); + pthread_sigmask(SIG_UNBLOCK, &set, (sigset_t*) 0); #endif pthread_attr_init(&thr_attr); @@ -915,10 +913,10 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) pthread_attr_setstacksize(&thr_attr,65536L); /* Start signal thread and wait for it to start */ - VOID(pthread_mutex_lock(&LOCK_thread_count)); + pthread_mutex_lock(&LOCK_thread_count); pthread_create(&tid,&thr_attr,signal_hand,NULL); - VOID(pthread_cond_wait(&COND_thread_count,&LOCK_thread_count)); - VOID(pthread_mutex_unlock(&LOCK_thread_count)); + pthread_cond_wait(&COND_thread_count,&LOCK_thread_count); + pthread_mutex_unlock(&LOCK_thread_count); DBUG_PRINT("info",("signal thread created")); thr_setconcurrency(3); @@ -946,7 +944,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) alarm_info.next_alarm_time); while (thread_count) { - VOID(pthread_cond_wait(&COND_thread_count,&LOCK_thread_count)); + pthread_cond_wait(&COND_thread_count,&LOCK_thread_count); if (thread_count == 1) { printf("Calling end_thr_alarm. This should cancel the last thread\n"); |