summaryrefslogtreecommitdiff
path: root/pthread_setschedparam.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-11-03 01:08:41 +0000
committerrpj <rpj>2004-11-03 01:08:41 +0000
commitec8290acdaea21b16d98f1ef5d4ae8a28ab2109a (patch)
tree0bd3750ec1cc12594b6cfe69473e393da6ec101b /pthread_setschedparam.c
parentcccaf0c2c82e78a72d69a4a50c872f308bed2f65 (diff)
Mutex, semaphore, thread ID, test suite changes - see ChangeLogs
Diffstat (limited to 'pthread_setschedparam.c')
-rw-r--r--pthread_setschedparam.c9
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;