Skip to main content

pthread_spin_lock

Function pthread_spin_lock 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pthread_spin_lock( lock: *mut pthread_spinlock_t, ) -> c_int
Expand description

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_spin_lock.html.

Locks the spin lock referenced by lock.

Upon success, returns 0. Upon failure, an error number is returned.

ยงSafety

It is undefined behaviour for any of the following:

  • lock is uninitialized.
  • The calling thread holds lock at the time the call is made.