Comment out most of pthread_setschedparam. Pthread priorities didn't

work before anyways, and I didn't want to fix broken code I had no
way of testing. It was necessary however, in order to get rid of GIANT_LOCK.
Pthread priorities will have to wait a little longer to get fixed.
This commit is contained in:
Mike Makonnen 2003-12-15 12:31:46 +00:00
parent cf8bfa740b
commit 2543fd4700

View file

@ -42,10 +42,11 @@ int
_pthread_setschedparam(pthread_t pthread, int policy,
const struct sched_param *param)
{
int old_prio, ret = 0;
#if 0
int old_prio = 0;
int in_readyq = 0;
#endif
int ret = 0;
if ((param == NULL) || (policy < SCHED_FIFO) || (policy > SCHED_RR))
return (EINVAL);
@ -54,6 +55,7 @@ _pthread_setschedparam(pthread_t pthread, int policy,
(param->sched_priority > PTHREAD_MAX_PRIORITY))
return (ENOTSUP);
#if 0 /* XXX pthread priorities don't work anyways */
/* Find the thread in the list of active threads: */
if ((ret = _find_thread(pthread)) == 0) {
GIANT_LOCK(curthread);
@ -112,5 +114,6 @@ _pthread_setschedparam(pthread_t pthread, int policy,
GIANT_UNLOCK(curthread);
}
#endif /* XXX pthread priorities don't work anyways */
return(ret);
}