#[unsafe(no_mangle)]pub unsafe extern "C" fn pthread_spin_destroy(
lock: *mut pthread_spinlock_t,
) -> c_intExpand description
See https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_spin_destroy.html.
Destroys the spin lock referenced by lock and releases any resources used
by the lock.
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:
- Subsequent use of
lockafter calling this function unless it is reinitialized withpthread_spin_init(). - This function is called when a thread holds the lock.
lockis uninitialized when this function is called.