X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fthread%2Fpthread_setschedparam.c;h=038d13d8acfb4cbd01aa573cd05c791fe2ef0b95;hb=41b290ba397067a09525b6ac89b4040728349046;hp=9e2fa45674ff6f80abd4979dae17f23d51b08dcd;hpb=c4bc0b1a64e1ef1e105df84401805a16e8dbe82a;p=musl diff --git a/src/thread/pthread_setschedparam.c b/src/thread/pthread_setschedparam.c index 9e2fa456..038d13d8 100644 --- a/src/thread/pthread_setschedparam.c +++ b/src/thread/pthread_setschedparam.c @@ -1,10 +1,11 @@ #include "pthread_impl.h" +#include "lock.h" int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) { int r; LOCK(t->killlock); - r = t->dead ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); + r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); UNLOCK(t->killlock); return r; }