svn commit: r238642 - head/lib/libthr/thread
David Xu
davidxu at FreeBSD.org
Fri Jul 20 03:22:18 UTC 2012
Author: davidxu
Date: Fri Jul 20 03:22:17 2012
New Revision: 238642
URL: http://svn.freebsd.org/changeset/base/238642
Log:
Don't assign same value.
Modified:
head/lib/libthr/thread/thr_setprio.c
head/lib/libthr/thread/thr_setschedparam.c
Modified: head/lib/libthr/thread/thr_setprio.c
==============================================================================
--- head/lib/libthr/thread/thr_setprio.c Fri Jul 20 03:16:52 2012 (r238641)
+++ head/lib/libthr/thread/thr_setprio.c Fri Jul 20 03:22:17 2012 (r238642)
@@ -45,10 +45,9 @@ _pthread_setprio(pthread_t pthread, int
int ret;
param.sched_priority = prio;
- if (pthread == curthread) {
- pthread = curthread;
+ if (pthread == curthread)
THR_LOCK(curthread);
- } else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)))
+ else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)))
return (ret);
if (pthread->attr.sched_policy == SCHED_OTHER ||
pthread->attr.prio == prio) {
Modified: head/lib/libthr/thread/thr_setschedparam.c
==============================================================================
--- head/lib/libthr/thread/thr_setschedparam.c Fri Jul 20 03:16:52 2012 (r238641)
+++ head/lib/libthr/thread/thr_setschedparam.c Fri Jul 20 03:22:17 2012 (r238642)
@@ -53,10 +53,9 @@ _pthread_setschedparam(pthread_t pthread
struct pthread *curthread = _get_curthread();
int ret;
- if (pthread == curthread) {
- pthread = curthread;
+ if (pthread == curthread)
THR_LOCK(curthread);
- } else if ((ret = _thr_find_thread(curthread, pthread,
+ else if ((ret = _thr_find_thread(curthread, pthread,
/*include dead*/0)) != 0)
return (ret);
if (pthread->attr.sched_policy == policy &&
More information about the svn-src-head
mailing list