summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-12-15 12:31:46 +0000
committermtm <mtm@FreeBSD.org>2003-12-15 12:31:46 +0000
commit7ecd6a1166a8499d5dba39c651a55139a9ff0e1e (patch)
tree8122957c5a7a1400ef6e0f967718b67b9dca222c /lib
parent72016b9b7c85a163bb23f0a7f8b053ae8e430c5a (diff)
downloadFreeBSD-src-7ecd6a1166a8499d5dba39c651a55139a9ff0e1e.zip
FreeBSD-src-7ecd6a1166a8499d5dba39c651a55139a9ff0e1e.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_setschedparam.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_setschedparam.c b/lib/libthr/thread/thr_setschedparam.c
index 04786a7..3e69641 100644
--- a/lib/libthr/thread/thr_setschedparam.c
+++ b/lib/libthr/thread/thr_setschedparam.c
@@ -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);
}
OpenPOWER on IntegriCloud