Don't assign same value.
This commit is contained in:
parent
670bc18dfe
commit
30dd4f448c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238642
@ -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) {
|
||||
|
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user