add missing m68k relocation types in elf.h
[musl] / src / thread / pthread_setschedprio.c
index e0bdc03..c353f6b 100644 (file)
@@ -3,8 +3,8 @@
 int pthread_setschedprio(pthread_t t, int prio)
 {
        int r;
-       __lock(t->killlock);
-       r = t->dead ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio);
-       __unlock(t->killlock);
+       LOCK(t->killlock);
+       r = !t->tid ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio);
+       UNLOCK(t->killlock);
        return r;
 }