axl_bool valvula_mutex_create ( ValvulaMutex mutex_def)

Allows to create a new mutex to protect critical sections to be executed by several threads at the same time.

To create a mutex you must:

1 // declare a mutex
2 ValvulaMutex mutex;
3 
4 // init it
5 if (! valvula_mutex_create (&mutex)) {
6  // failed to init mutex
7 }
8 // mutex created
Parameters
mutex_defA reference to the mutex to be initialized.
Returns
axl_true if the function created the mutex, otherwise axl_false is returned.

Referenced by valvula_async_queue_new(), valvula_connection_new_empty(), valvula_ctx_register_request_handler(), valvula_hash_new_full(), and valvula_thread_pool_init().