Description
For the current thread, identify which operations should spin.
Definition
int onload_thread_get_spin(unsigned *state)
Formal Parameters
-
state
- Location at which to write the spin status as a bitmask. Bit n of the mask is set if spinning has been enabled for spin type n (see onload_thread_set_spin).
Return Value
0 on success.
Notes
Spin time (for all threads) is set using the EF_SPIN_USEC parameter.
Examples
Determine if spinning is enabled for UDP receive:
unsigned state;
onload_thread_get_spin(&state);
if (state & (1 << ONLOAD_SPIN_UDP_RECV)) {
// spinning is enabled for UDP receive
}