summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c49
1 files changed, 4 insertions, 45 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index aba3e47d754..fd1798ab203 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -31,46 +31,6 @@
uint thd_lib_detected= 0;
-#ifndef my_pthread_setprio
-void my_pthread_setprio(pthread_t thread_id,int prior)
-{
-#ifdef HAVE_PTHREAD_SETSCHEDPARAM
- struct sched_param tmp_sched_param;
- bzero((char*) &tmp_sched_param,sizeof(tmp_sched_param));
- tmp_sched_param.sched_priority=prior;
- VOID(pthread_setschedparam(thread_id,SCHED_POLICY,&tmp_sched_param));
-#endif
-}
-#endif
-
-#ifndef my_pthread_getprio
-int my_pthread_getprio(pthread_t thread_id)
-{
-#ifdef HAVE_PTHREAD_SETSCHEDPARAM
- struct sched_param tmp_sched_param;
- int policy;
- if (!pthread_getschedparam(thread_id,&policy,&tmp_sched_param))
- {
- return tmp_sched_param.sched_priority;
- }
-#endif
- return -1;
-}
-#endif
-
-#ifndef my_pthread_attr_setprio
-void my_pthread_attr_setprio(pthread_attr_t *attr, int priority)
-{
-#ifdef HAVE_PTHREAD_SETSCHEDPARAM
- struct sched_param tmp_sched_param;
- bzero((char*) &tmp_sched_param,sizeof(tmp_sched_param));
- tmp_sched_param.sched_priority=priority;
- VOID(pthread_attr_setschedparam(attr,&tmp_sched_param));
-#endif
-}
-#endif
-
-
/* To allow use of pthread_getspecific with two arguments */
#ifdef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC
@@ -308,7 +268,7 @@ void sigwait_handle_sig(int sig)
{
pthread_mutex_lock(&LOCK_sigwait);
sigaddset(&pending_set, sig);
- VOID(pthread_cond_signal(&COND_sigwait)); /* inform sigwait() about signal */
+ pthread_cond_signal(&COND_sigwait); /* inform sigwait() about signal */
pthread_mutex_unlock(&LOCK_sigwait);
}
@@ -364,9 +324,8 @@ int sigwait(sigset_t *setp, int *sigp)
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(&sigwait_thread_id,&thr_attr,sigwait_thread,setp));
- VOID(pthread_attr_destroy(&thr_attr));
+ pthread_create(&sigwait_thread_id,&thr_attr,sigwait_thread,setp);
+ pthread_attr_destroy(&thr_attr);
}
pthread_mutex_lock(&LOCK_sigwait);
@@ -392,7 +351,7 @@ int sigwait(sigset_t *setp, int *sigp)
return 0;
}
}
- VOID(pthread_cond_wait(&COND_sigwait,&LOCK_sigwait));
+ pthread_cond_wait(&COND_sigwait,&LOCK_sigwait);
}
return 0;
}