初始化版本
This commit is contained in:
23
osal/include/osal_sem.h
Normal file
23
osal/include/osal_sem.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef __OSAL_SEM_H__
|
||||
#define __OSAL_SEM_H__
|
||||
|
||||
#include "osal_def.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void* osal_sem_t;
|
||||
|
||||
/* Semaphore API */
|
||||
osal_sem_t osal_sem_create(const char* name, osal_uint32_t value);
|
||||
osal_err_t osal_sem_delete(osal_sem_t sem);
|
||||
osal_err_t osal_sem_take(osal_sem_t sem, osal_int32_t timeout);
|
||||
osal_err_t osal_sem_trytake(osal_sem_t sem);
|
||||
osal_err_t osal_sem_release(osal_sem_t sem);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OSAL_SEM_H__ */
|
||||
Reference in New Issue
Block a user