mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't assign same value.
This commit is contained in:
parent
670bc18dfe
commit
30dd4f448c
2 changed files with 4 additions and 6 deletions
|
|
@ -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 a new issue