#[unsafe(no_mangle)]pub unsafe extern "C" fn pthread_spin_init(
lock: *mut pthread_spinlock_t,
_pshared: c_int,
) -> c_intExpand description
See https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_spin_init.html.
Allocates any resources required to use the spin lock referenced to by
lock and initializes the lock to an unlocked state.
Upon success, returns 0. Upon failure, an error number is returned.
§Implementation
Cannot fail on the Rust side so no error number is ever returned.
§Safety
It is undefined behaviour for any of the following:
lockhas already been initialized.lockhas been used before being initialized by this function.