Don't assign same value.

This commit is contained in:
David Xu 2012-07-20 03:22:17 +00:00
parent 670bc18dfe
commit 30dd4f448c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238642
2 changed files with 4 additions and 6 deletions

View File

@ -45,10 +45,9 @@ _pthread_setprio(pthread_t pthread, int prio)
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) {

View File

@ -53,10 +53,9 @@ _pthread_setschedparam(pthread_t pthread, int policy,
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 &&