O2S C Library 1.8.2
Provide high-level data-structures and other fundamental tools for C projects
Loading...
Searching...
No Matches
mutex.c File Reference

Provide a convenient RAII-style mechanism to access mutex-protected resources. More...

#include "o2s/mutex.h"
#include "o2s/log.h"
#include <pthread.h>
#include <string.h>

Go to the source code of this file.

Functions

pthread_mutex_t * o2s_mutex_lock (pthread_mutex_t *mutex)
 Lock the mutex, logging any error.
void o2s_mutex_unlock (pthread_mutex_t *const *mutex)
 Unlock the mutex, logging any error.

Detailed Description

Provide a convenient RAII-style mechanism to access mutex-protected resources.

Author
Antoine GAGNIERE

Definition in file mutex.c.