TuyaOS
tuya_hal_semaphore.h
浏览该文件的文档.
1
10#ifndef _TUYA_HAL_SEMAPHORE_H
11#define _TUYA_HAL_SEMAPHORE_H
12
13#include "tal_semaphore.h"
14
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define tuya_hal_semaphore_create_init(handle, sem_cnt, sem_max) \
21 tal_semaphore_create_init(handle, sem_cnt, sem_max)
22
23#define tuya_hal_semaphore_wait(handle) \
24 tal_semaphore_wait(handle, SEM_WAIT_FOREVER)
25
26#define tuya_hal_semaphore_waittimeout(handle, timeout) \
27 tal_semaphore_wait(handle, timeout)
28
29#define tuya_hal_semaphore_post(handle) \
30 tal_semaphore_post(handle)
31
32#define tuya_hal_semaphore_release(handle) \
33 tal_semaphore_release(handle)
34
35#ifdef __cplusplus
36}
37#endif /* __cplusplus */
38
39#endif
40