From a50745ec922a917513029f3f87bf820827b43f29 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 14 Aug 2003 08:53:17 +0000 Subject: Reuse of thread IDs, improved thread ID validation, new tests, bug fixes. --- pthread_getschedparam.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pthread_getschedparam.c') 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; } /* -- cgit v1.2.3