X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_getschedparam.c;h=1cba073d0c7d549023e2b5cc7faeb1ec8faa401e;hb=bdb0817599325e6ca6838717dfe18290695a59a2;hp=a994b637306a40c1155c1e400bfd2816b888676e;hpb=c4bc0b1a64e1ef1e105df84401805a16e8dbe82a;p=musl diff --git a/src/thread/pthread_getschedparam.c b/src/thread/pthread_getschedparam.c index a994b637..1cba073d 100644 --- a/src/thread/pthread_getschedparam.c +++ b/src/thread/pthread_getschedparam.c @@ -1,10 +1,11 @@ #include "pthread_impl.h" +#include "lock.h" int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param *restrict param) { int r; LOCK(t->killlock); - if (t->dead) { + if (!t->tid) { r = ESRCH; } else { r = -__syscall(SYS_sched_getparam, t->tid, param);