mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
Don't assign same value.
This commit is contained in:
parent
670bc18dfe
commit
30dd4f448c
@ -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