Skip to main content

apr_thread_mutex_create

Function apr_thread_mutex_create 

Source
pub unsafe extern "C" fn apr_thread_mutex_create(
    mutex: *mut *mut apr_thread_mutex_t,
    flags: c_uint,
    pool: *mut apr_pool_t,
) -> apr_status_t
Expand description

Create and initialize a mutex that can be used to synchronize threads. @param mutex the memory address where the newly created mutex will be stored. @param flags Or’ed value of:

          APR_THREAD_MUTEX_DEFAULT   platform-optimal lock behavior.
          APR_THREAD_MUTEX_NESTED    enable nested (recursive) locks.
          APR_THREAD_MUTEX_UNNESTED  disable nested locks (non-recursive).
@param pool the pool from which to allocate the mutex. @warning Be cautious in using APR_THREAD_MUTEX_DEFAULT. While this is the most optimal mutex based on a given platform's performance characteristics, it will behave as either a nested or an unnested lock.