From bb610376a5e993ec00e22a5e13f106b3b43d90f6 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 2 Apr 2003 03:05:39 +0000 Subject: - Define curthread as _get_curthread() and remove all direct calls to _get_curthread(). This is similar to the kernel's curthread. Doing this saves stack overhead and is more convenient to the programmer. - Pass the pointer to the newly created thread to _thread_init(). - Remove _get_curthread_slow(). --- lib/libthr/thread/thr_setschedparam.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/libthr/thread/thr_setschedparam.c') diff --git a/lib/libthr/thread/thr_setschedparam.c b/lib/libthr/thread/thr_setschedparam.c index 14aa207..7746383 100644 --- a/lib/libthr/thread/thr_setschedparam.c +++ b/lib/libthr/thread/thr_setschedparam.c @@ -42,7 +42,6 @@ int _pthread_setschedparam(pthread_t pthread, int policy, const struct sched_param *param) { - pthread_t curthread; int old_prio, in_readyq = 0, ret = 0; if ((param == NULL) || (policy < SCHED_FIFO) || (policy > SCHED_RR)) @@ -52,7 +51,6 @@ _pthread_setschedparam(pthread_t pthread, int policy, (param->sched_priority > PTHREAD_MAX_PRIORITY)) return (ENOTSUP); - curthread = _get_curthread(); /* Find the thread in the list of active threads: */ if ((ret = _find_thread(pthread)) == 0) { GIANT_LOCK(curthread); -- cgit v1.1