Skip to main content

drmgr_register_tls_field

Function drmgr_register_tls_field 

Source
pub unsafe extern "C" fn drmgr_register_tls_field() -> c_int
Expand description

Reserves a thread-local storage (tls) slot for every thread. Returns the index of the slot, which should be passed to drmgr_get_tls_field() and drmgr_set_tls_field(). Returns -1 if there are no more slots available. Each slot is initialized to NULL for each thread and should be properly initialized with drmgr_set_tls_field() in the thread initialization event (see dr_register_thread_init_event()).