mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Restore variable aliasing in the context of cpu set operations
A simplification of set operations removed side-effects of the previous code, which are restored by this commit.
This commit is contained in:
parent
398c88c758
commit
a19bd8e30e
|
@ -548,7 +548,8 @@ _rm_wlock(struct rmlock *rm)
|
|||
|
||||
if (CPU_CMP(&rm->rm_writecpus, &all_cpus)) {
|
||||
/* Get all read tokens back */
|
||||
CPU_ANDNOT(&readcpus, &all_cpus, &rm->rm_writecpus);
|
||||
readcpus = all_cpus;
|
||||
CPU_ANDNOT(&readcpus, &readcpus, &rm->rm_writecpus);
|
||||
rm->rm_writecpus = all_cpus;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1179,7 +1179,8 @@ forward_wakeup(int cpunum)
|
|||
}
|
||||
|
||||
if (forward_wakeup_use_mask) {
|
||||
CPU_ANDNOT(&map, &idle_cpus_mask, &dontuse);
|
||||
map = idle_cpu_mask;
|
||||
CPU_ANDNOT(&map, &map, &dontuse);
|
||||
|
||||
/* If they are both on, compare and use loop if different. */
|
||||
if (forward_wakeup_use_loop) {
|
||||
|
@ -1365,7 +1366,8 @@ sched_add(struct thread *td, int flags)
|
|||
kick_other_cpu(td->td_priority, cpu);
|
||||
} else {
|
||||
if (!single_cpu) {
|
||||
CPU_ANDNOT(&tidlemsk, &idle_cpus_mask, &hlt_cpus_mask);
|
||||
tidlemsk = idle_cpus_mask;
|
||||
CPU_ANDNOT(&tidlemsk, &tidlemsk, &hlt_cpus_mask);
|
||||
CPU_CLR(cpuid, &tidlemsk);
|
||||
|
||||
if (!CPU_ISSET(cpuid, &idle_cpus_mask) &&
|
||||
|
|
|
@ -707,7 +707,8 @@ kdb_trap(int type, int code, struct trapframe *tf)
|
|||
|
||||
if (!SCHEDULER_STOPPED()) {
|
||||
#ifdef SMP
|
||||
CPU_ANDNOT(&other_cpus, &all_cpus, &stopped_cpus);
|
||||
other_cpus = all_cpus;
|
||||
CPU_ANDNOT(&other_cpus, &other_cpus, &stopped_cpus);
|
||||
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
||||
stop_cpus_hard(other_cpus);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue