nstd_mutex_new

Function nstd_mutex_new 

Source
#[unsafe(no_mangle)]
pub extern "C" fn nstd_mutex_new( data: NSTDHeapPtr<'_>, ) -> NSTDOptionalMutex<'_>
Available on crate feature mutex only.
Expand description

Creates a new mutual exclusion primitive.

§Parameters:

  • NSTDHeapPtr data - The data to protect.

§Returns

NSTDOptionalMutex mutex - The new mutex protecting data on success, or an uninitialized “none” variant on error.