Function Documentation

A file name to use if the mutex mechanism requires one. This argument should always be provided. The mutex code itself will determine if it should be used. This filename should be the same one that was passed to apr_global_mutex_create().

pool

The pool to operate on.

Remarks

This function must be called to maintain portability, even if the underlying lock mechanism does not require it.

Create and initialize a mutex that can be used to synchronize both processes and threads. Note: There is considerable overhead in using this API if only cross-process or cross-thread mutual exclusion is required. See apr_proc_mutex.h and apr_thread_mutex.h for more specialized lock routines.

Parameters

mutex

the memory address where the newly created mutex will be stored.

fname

A file name to use if the lock mechanism requires one. This argument should always be provided. The lock code itself will determine if it should be used.

Attempt to acquire the lock for the given mutex. If the mutex has already been acquired, the call returns immediately with APR_EBUSY. Note: it is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine if the return value was APR_EBUSY, for portability reasons.