Skip to main content

register_thread

Function register_thread 

Source
pub fn register_thread() -> RcuThreadRegistration
Expand description

Registers the current thread for RCU and RSEQ.

With RSEQ enabled, RCU requires registration of its RSEQ critical section. By default, it registers and unregisters on each rcu_read_lock. To avoid this overhead, if a thread knows the only RSEQ it needs is for RCU, it may create an RcuThreadRegistration which will keep the registration alive for as long as the RcuThreadRegistration exists. This avoids the overhead of registration on each read lock, but no other RSEQs may be used by the thread until dropped.