summaryrefslogtreecommitdiff
path: root/pthread_setschedparam.c
diff options
context:
space:
mode:
authorrpj <rpj>2003-08-14 08:53:17 +0000
committerrpj <rpj>2003-08-14 08:53:17 +0000
commita50745ec922a917513029f3f87bf820827b43f29 (patch)
tree1e221862e0550d163baef12d17634430ae677824 /pthread_setschedparam.c
parent414f4bd7e70d94025576d9264c86da63c506f6ca (diff)
Reuse of thread IDs, improved thread ID validation, new tests, bug fixes.
Diffstat (limited to 'pthread_setschedparam.c')
-rw-r--r--pthread_setschedparam.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c
index 1a24f1f..8eff605 100644
--- a/pthread_setschedparam.c
+++ b/pthread_setschedparam.c
@@ -43,11 +43,13 @@ pthread_setschedparam(pthread_t thread, int policy,
const struct sched_param *param)
{
int prio;
+ int result;
/* Validate the thread id. */
- if (thread == NULL || thread->threadH == 0)
+ result = pthread_kill(thread, 0);
+ if (0 != result)
{
- return ESRCH;
+ return result;
}
/* Validate the scheduling policy. */