signal_context_set_locking_functions

Function signal_context_set_locking_functions 

Source
pub unsafe extern "C" fn signal_context_set_locking_functions(
    context: *mut signal_context,
    lock: Option<unsafe extern "C" fn(user_data: *mut c_void)>,
    unlock: Option<unsafe extern "C" fn(user_data: *mut c_void)>,
) -> c_int
Expand description

Set the locking functions to be used by the Signal Protocol library for synchronization.

Note: These functions must allow recursive locking (e.g. PTHREAD_MUTEX_RECURSIVE)

@param lock function to lock a mutex @param unlock function to unlock a mutex @return 0 on success, negative on failure