pub extern "C" fn read_first_register() -> usize
Expand description

Reads the value of the first register from the actual CPU register hardware.

This can be called at any time, but is intended for use as the second half of “saving and restoring” a register value. The first half was a previous call to [ContextRegular::set_first_register()], and the second half is a call to this function immediately after the original ContextRegular has been used for switching to a new task for the first time.

Returns the current value held in the specified CPU register. On x86_64, this reads the r15 register.