Skip to main content

write_percpu_reg

Function write_percpu_reg 

Source
pub unsafe fn write_percpu_reg(tp: usize)
Expand description

Writes the architecture-specific per-CPU data register.

Sets the per-CPU register to the given value, which should be the base address of the current CPU’s per-CPU data area.

§Safety

This function is unsafe because it directly writes to a low-level register. Setting an invalid address may cause undefined behavior.

§Architecture-specific registers

See read_percpu_reg() for the list of registers used per architecture.