diff options
author | rpj <rpj> | 2004-11-03 01:08:41 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-11-03 01:08:41 +0000 |
commit | ec8290acdaea21b16d98f1ef5d4ae8a28ab2109a (patch) | |
tree | 0bd3750ec1cc12594b6cfe69473e393da6ec101b /pthread_setschedparam.c | |
parent | cccaf0c2c82e78a72d69a4a50c872f308bed2f65 (diff) |
Mutex, semaphore, thread ID, test suite changes - see ChangeLogs
Diffstat (limited to 'pthread_setschedparam.c')
-rw-r--r-- | pthread_setschedparam.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index d23e5d0..d3af098 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -72,6 +72,7 @@ ptw32_setthreadpriority (pthread_t thread, int policy, int priority) { int prio; int result; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; prio = priority; @@ -99,12 +100,12 @@ ptw32_setthreadpriority (pthread_t thread, int policy, int priority) #endif - result = pthread_mutex_lock (&thread->threadLock); + result = pthread_mutex_lock (&tp->threadLock); if (0 == result) { /* If this fails, the current priority is unchanged. */ - if (0 == SetThreadPriority (thread->threadH, prio)) + if (0 == SetThreadPriority (tp->threadH, prio)) { result = EINVAL; } @@ -114,10 +115,10 @@ ptw32_setthreadpriority (pthread_t thread, int policy, int priority) * Must record the thread's sched_priority as given, * not as finally adjusted. */ - thread->sched_priority = priority; + tp->sched_priority = priority; } - (void) pthread_mutex_unlock (&thread->threadLock); + (void) pthread_mutex_unlock (&tp->threadLock); } return result; |