diff options
author | rpj <rpj> | 2003-09-18 02:31:39 +0000 |
---|---|---|
committer | rpj <rpj> | 2003-09-18 02:31:39 +0000 |
commit | af1871fba4fc253b5a31e4a0eed667fe79f534d7 (patch) | |
tree | 1242599d7334ae50c5c05f9b23b52876e4287924 /pthread_getschedparam.c | |
parent | fac679912b15dd89cafdb09bf873d7eacc80a05e (diff) |
Cleanup and fixes to thread priority management. Other minor changes.snap-2003-09-18
Diffstat (limited to 'pthread_getschedparam.c')
-rw-r--r-- | pthread_getschedparam.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 28800c7..ac02775 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -42,7 +42,6 @@ int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) { - int prio; int result; /* Validate the thread id. */ @@ -64,13 +63,13 @@ pthread_getschedparam(pthread_t thread, int *policy, /* Fill out the policy. */ *policy = SCHED_OTHER; - /* Fill out the sched_param structure. */ - prio = GetThreadPriority(thread->threadH); - if (prio == THREAD_PRIORITY_ERROR_RETURN) - { - return EINVAL; - } - - param->sched_priority = prio; + /* + * This function must return the priority value set by + * the most recent pthread_setschedparam() or pthread_create() + * for the target thread. It must not return the actual thread + * priority as altered by any system priority adjustments etc. + */ + param->sched_priority = thread->sched_priority; + return 0; } |