diff options
author | rpj <rpj> | 2003-08-14 08:53:17 +0000 |
---|---|---|
committer | rpj <rpj> | 2003-08-14 08:53:17 +0000 |
commit | a50745ec922a917513029f3f87bf820827b43f29 (patch) | |
tree | 1e221862e0550d163baef12d17634430ae677824 /pthread_getschedparam.c | |
parent | 414f4bd7e70d94025576d9264c86da63c506f6ca (diff) |
Reuse of thread IDs, improved thread ID validation, new tests, bug fixes.
Diffstat (limited to 'pthread_getschedparam.c')
-rw-r--r-- | pthread_getschedparam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 081bfe3..125999a 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -43,11 +43,13 @@ pthread_getschedparam(pthread_t thread, int *policy, 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; } /* |