Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/src/linux_rcu.c
Show First 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | linux_synchronize_rcu(void) | ||||
if (RCU_SKIP()) | if (RCU_SKIP()) | ||||
return; | return; | ||||
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, | WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, | ||||
"linux_synchronize_rcu() can sleep"); | "linux_synchronize_rcu() can sleep"); | ||||
td = curthread; | td = curthread; | ||||
DROP_GIANT(); | |||||
/* | /* | ||||
* Synchronizing RCU might change the CPU core this function | * Synchronizing RCU might change the CPU core this function | ||||
* is running on. Save current values: | * is running on. Save current values: | ||||
*/ | */ | ||||
thread_lock(td); | thread_lock(td); | ||||
DROP_GIANT(); | |||||
old_cpu = PCPU_GET(cpuid); | old_cpu = PCPU_GET(cpuid); | ||||
old_pinned = td->td_pinned; | old_pinned = td->td_pinned; | ||||
old_prio = td->td_priority; | old_prio = td->td_priority; | ||||
was_bound = sched_is_bound(td); | was_bound = sched_is_bound(td); | ||||
sched_unbind(td); | sched_unbind(td); | ||||
td->td_pinned = 0; | td->td_pinned = 0; | ||||
sched_bind(td, old_cpu); | sched_bind(td, old_cpu); | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |