#ifndef __OSAL_MUTEX_H__
#define __OSAL_MUTEX_H__

#include "osal_def.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef void* osal_mutex_t;

/* Mutex API */
osal_mutex_t osal_mutex_create(const char* name);
osal_err_t osal_mutex_delete(osal_mutex_t mutex);
osal_err_t osal_mutex_take(osal_mutex_t mutex, osal_int32_t timeout);
osal_err_t osal_mutex_trytake(osal_mutex_t mutex);
osal_err_t osal_mutex_release(osal_mutex_t mutex);

#ifdef __cplusplus
}
#endif

#endif /* __OSAL_MUTEX_H__ */
