summaryrefslogtreecommitdiff
path: root/src/thread/pthread_setschedprio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_setschedprio.c')
-rw-r--r--src/thread/pthread_setschedprio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_setschedprio.c b/src/thread/pthread_setschedprio.c
index dc745b42..c353f6b5 100644
--- a/src/thread/pthread_setschedprio.c
+++ b/src/thread/pthread_setschedprio.c
@@ -4,7 +4,7 @@ int pthread_setschedprio(pthread_t t, int prio)
{
int r;
LOCK(t->killlock);
- r = t->dead ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio);
+ r = !t->tid ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio);
UNLOCK(t->killlock);
return r;
}