Home
last modified time | relevance | path

Searched refs:sem (Results 1 – 25 of 72) sorted by relevance

123

/device/soc/hisilicon/hi3751v350/sdk_linux/source/common/drv/osal/
Dosal_semaphore.c26 int osal_sem_init(osal_semaphore *sem, int val) in osal_sem_init() argument
30 if (sem == NULL) { in osal_sem_init()
42 sem->sem = p; in osal_sem_init()
48 int osal_sem_down(osal_semaphore *sem) in osal_sem_down() argument
52 if (sem == NULL) { in osal_sem_down()
57 p = (struct semaphore *)(sem->sem); in osal_sem_down()
64 int osal_sem_down_interruptible(osal_semaphore *sem) in osal_sem_down_interruptible() argument
68 if (sem == NULL) { in osal_sem_down_interruptible()
73 p = (struct semaphore *)(sem->sem); in osal_sem_down_interruptible()
79 int osal_sem_trydown(osal_semaphore *sem) in osal_sem_trydown() argument
[all …]
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/osal/linux/
Dosal_semaphore.c26 int osal_sema_init(osal_semaphore_t *sem, int val) in osal_sema_init() argument
30 if (sem == NULL) { in osal_sema_init()
40 sem->sem = p; in osal_sema_init()
44 int osal_down(osal_semaphore_t *sem) in osal_down() argument
48 if (sem == NULL) { in osal_down()
52 p = (struct semaphore *)(sem->sem); in osal_down()
57 int osal_down_interruptible(osal_semaphore_t *sem) in osal_down_interruptible() argument
61 if (sem == NULL) { in osal_down_interruptible()
65 p = (struct semaphore *)(sem->sem); in osal_down_interruptible()
69 int osal_down_trylock(osal_semaphore_t *sem) in osal_down_trylock() argument
[all …]
/device/soc/esp/esp32/components/esp_lwip/port/
Dsys_arch.c123 sys_sem_new(sys_sem_t *sem, u8_t count) in sys_sem_new() argument
128 *sem = xSemaphoreCreateBinary(); in sys_sem_new()
129 if (*sem == NULL) { in sys_sem_new()
135 BaseType_t ret = xSemaphoreGive(*sem); in sys_sem_new()
148 sys_sem_signal(sys_sem_t *sem) in sys_sem_signal() argument
150 BaseType_t ret = xSemaphoreGive(*sem); in sys_sem_signal()
159 sys_sem_signal_isr(sys_sem_t *sem) in sys_sem_signal_isr() argument
162 xSemaphoreGiveFromISR(*sem, &woken); in sys_sem_signal_isr()
174 sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) in sys_arch_sem_wait() argument
180 ret = xSemaphoreTake(*sem, portMAX_DELAY); in sys_arch_sem_wait()
[all …]
/device/soc/esp/esp32/components/bt/common/osi/
Dsemaphore.c26 int osi_sem_new(osi_sem_t *sem, uint32_t max_count, uint32_t init_count) in osi_sem_new() argument
30 if (sem) { in osi_sem_new()
31 *sem = xSemaphoreCreateCounting(max_count, init_count); in osi_sem_new()
32 if ((*sem) != NULL) { in osi_sem_new()
42 void osi_sem_give(osi_sem_t *sem) in osi_sem_give() argument
44 xSemaphoreGive(*sem); in osi_sem_give()
55 osi_sem_take(osi_sem_t *sem, uint32_t timeout) in osi_sem_take() argument
60 if (xSemaphoreTake(*sem, portMAX_DELAY) != pdTRUE) { in osi_sem_take()
64 if (xSemaphoreTake(*sem, timeout / portTICK_PERIOD_MS) != pdTRUE) { in osi_sem_take()
73 void osi_sem_free(osi_sem_t *sem) in osi_sem_free() argument
[all …]
/device/soc/rockchip/rk3588/kernel/include/trace/hooks/
Drwsem.h16 TP_PROTO(struct rw_semaphore *sem),
17 TP_ARGS(sem));
19 TP_PROTO(struct rw_semaphore *sem),
20 TP_ARGS(sem));
22 TP_PROTO(struct rw_semaphore *sem),
23 TP_ARGS(sem));
26 struct rw_semaphore *sem,
28 TP_ARGS(waiter, sem, already_on_list));
30 TP_PROTO(struct rw_semaphore *sem),
31 TP_ARGS(sem));
Ddtask.h32 TP_PROTO(struct rw_semaphore *sem),
33 TP_ARGS(sem));
35 TP_PROTO(struct rw_semaphore *sem),
36 TP_ARGS(sem));
38 TP_PROTO(struct rw_semaphore *sem),
39 TP_ARGS(sem));
41 TP_PROTO(struct rw_semaphore *sem),
42 TP_ARGS(sem));
/device/soc/winnermicro/wm800/board/src/bt/blehost/porting/w800/src/
Dnpl_os_freertos.c139 ble_npl_error_t npl_freertos_sem_init(struct ble_npl_sem *sem, uint16_t tokens) in npl_freertos_sem_init() argument
143 if (!sem) { in npl_freertos_sem_init()
147 status = tls_os_sem_create(&sem->handle, tokens); in npl_freertos_sem_init()
149 assert(sem->handle); in npl_freertos_sem_init()
152 ble_npl_error_t npl_freertos_sem_deinit(struct ble_npl_sem *sem) in npl_freertos_sem_deinit() argument
156 if (!sem) { in npl_freertos_sem_deinit()
160 if (sem->handle) { in npl_freertos_sem_deinit()
161 status = tls_os_sem_delete(sem->handle); in npl_freertos_sem_deinit()
168 ble_npl_error_t npl_freertos_sem_pend(struct ble_npl_sem *sem, ble_npl_time_t timeout) in npl_freertos_sem_pend() argument
172 if (!sem) { in npl_freertos_sem_pend()
[all …]
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/net/wireless/xr829/include/linux/
Dsemaphore.h31 static inline void sema_init(struct semaphore *sem, int val) in sema_init() argument
34 *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val); in sema_init()
35 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); in sema_init()
38 extern void down(struct semaphore *sem);
39 extern int __must_check down_interruptible(struct semaphore *sem);
40 extern int __must_check down_killable(struct semaphore *sem);
41 extern int __must_check down_trylock(struct semaphore *sem);
42 extern int __must_check down_timeout(struct semaphore *sem, long jiffies);
43 extern void up(struct semaphore *sem);
/device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/app_drivers/src/
Dapp_rtos_cfg.c50 uint16_t app_driver_sem_init(sem_t *sem) in app_driver_sem_init() argument
52 SemaphoreHandle_t *xSemaphore = (SemaphoreHandle_t *)sem; in app_driver_sem_init()
54 if (sem == NULL) { in app_driver_sem_init()
64 void app_driver_sem_deinit(sem_t sem) in app_driver_sem_deinit() argument
66 vSemaphoreDelete(sem); in app_driver_sem_deinit()
69 uint16_t app_driver_sem_pend(sem_t sem, uint32_t time_out) in app_driver_sem_pend() argument
73 SemaphoreHandle_t xSemaphore = (SemaphoreHandle_t)sem; in app_driver_sem_pend()
76 if (sem == NULL) { in app_driver_sem_pend()
98 uint16_t app_driver_sem_post(sem_t sem) in app_driver_sem_post() argument
102 SemaphoreHandle_t xSemaphore = (SemaphoreHandle_t)sem; in app_driver_sem_post()
[all …]
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/
Doal_semaphore.h57 static inline hi_void oal_sema_init(oal_semaphore_stru *sem, hi_s32 val) in oal_sema_init() argument
59 sema_init(sem, val); in oal_sema_init()
63 static inline hi_void oal_up(oal_semaphore_stru *sem) in oal_up() argument
65 up(sem); in oal_up()
68 static inline hi_void oal_down(oal_semaphore_stru *sem) in oal_down() argument
70 down(sem); in oal_down()
73 static inline hi_s32 oal_down_timeout(oal_semaphore_stru *sem, hi_s32 timeout) in oal_down_timeout() argument
75 return down_timeout(sem, timeout); in oal_down_timeout()
78 static inline hi_s32 oal_down_interruptible(oal_semaphore_stru *sem) in oal_down_interruptible() argument
80 return down_interruptible(sem); in oal_down_interruptible()
[all …]
/device/soc/beken/bk7235/liteos_m/third_party_adapter/lwip_intf_v2_1/lwip-2.1.2/port/
Dsys_arch.c221 err_t sys_sem_new(sys_sem_t *sem, u8_t count) in sys_sem_new() argument
225 ret = rtos_init_semaphore_adv(sem, 0xff, count); in sys_sem_new()
230 ++lwip_stats.sys.sem.used; in sys_sem_new()
231 if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) { in sys_sem_new()
232 lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; in sys_sem_new()
255 u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) in sys_arch_sem_wait() argument
264 ret = rtos_get_semaphore(sem, timeout); in sys_arch_sem_wait()
279 ret = rtos_get_semaphore(sem, BEKEN_WAIT_FOREVER); in sys_arch_sem_wait()
292 void sys_sem_signal(sys_sem_t *sem) in sys_sem_signal() argument
294 rtos_set_semaphore(sem); in sys_sem_signal()
[all …]
/device/board/unionman/unionpi_tiger/kernel/drivers/isp/drivers/v4l2_dev/src/platform/
Dsystem_semaphore.c26 int32_t system_semaphore_init( semaphore_t *sem ) in system_semaphore_init() argument
29 *sem = sys_sem; in system_semaphore_init()
35 int32_t system_semaphore_raise( semaphore_t sem ) in system_semaphore_raise() argument
37 struct semaphore *sys_sem = (struct semaphore *)sem; in system_semaphore_raise()
42 int32_t system_semaphore_wait( semaphore_t sem, uint32_t timeout_ms ) in system_semaphore_wait() argument
44 struct semaphore *sys_sem = (struct semaphore *)sem; in system_semaphore_wait()
53 int32_t system_semaphore_destroy( semaphore_t sem ) in system_semaphore_destroy() argument
55 struct semaphore *sys_sem = (struct semaphore *)sem; in system_semaphore_destroy()
/device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/app_drivers/inc/
Dapp_rtos_cfg.h124 #define APP_DRV_SEM_DECL(sem) sem_t sem /**< Define a semaphore instance */ argument
148 uint16_t app_driver_sem_init(sem_t *sem);
159 void app_driver_sem_deinit(sem_t sem);
172 uint16_t app_driver_sem_pend(sem_t sem, uint32_t time_out);
184 uint16_t app_driver_sem_post(sem_t sem);
196 uint16_t app_driver_sem_post_from_isr(sem_t sem);
/device/soc/esp/esp32/components/pthread/
Dpthread.c64 SemaphoreHandle_t sem; ///< Handle of the task waiting to join
566 mux->sem = xSemaphoreCreateRecursiveMutex();
568 mux->sem = xSemaphoreCreateMutex();
570 if (!mux->sem) {
601 res = xSemaphoreGiveRecursive(mux->sem);
603 res = xSemaphoreGive(mux->sem);
608 vSemaphoreDelete(mux->sem);
621 (xSemaphoreGetMutexHolder(mux->sem) == xTaskGetCurrentTaskHandle())) {
626 if (xSemaphoreTakeRecursive(mux->sem, tmo) != pdTRUE) {
630 if (xSemaphoreTake(mux->sem, tmo) != pdTRUE) {
[all …]
/device/soc/winnermicro/wm800/board/src/bt/blehost/porting/w800/include/nimble/
Dnimble_npl_os.h166 static inline ble_npl_error_t ble_npl_sem_init(struct ble_npl_sem *sem, uint16_t tokens) in ble_npl_sem_init() argument
168 return npl_freertos_sem_init(sem, tokens); in ble_npl_sem_init()
170 static inline ble_npl_error_t ble_npl_sem_deinit(struct ble_npl_sem *sem) in ble_npl_sem_deinit() argument
172 return npl_freertos_sem_deinit(sem); in ble_npl_sem_deinit()
175 static inline ble_npl_error_t ble_npl_sem_pend(struct ble_npl_sem *sem, ble_npl_time_t timeout) in ble_npl_sem_pend() argument
177 return npl_freertos_sem_pend(sem, timeout); in ble_npl_sem_pend()
180 static inline ble_npl_error_t ble_npl_sem_release(struct ble_npl_sem *sem) in ble_npl_sem_release() argument
182 return npl_freertos_sem_release(sem); in ble_npl_sem_release()
185 static inline uint16_t ble_npl_sem_get_count(struct ble_npl_sem *sem) in ble_npl_sem_get_count() argument
187 return npl_freertos_get_sem_count(sem); in ble_npl_sem_get_count()
/device/soc/hisilicon/hi3861v100/sdk_liteos/third_party/lwip_sack/include/lwip/
Dsys.h193 err_t sys_sem_new(sys_sem_t *sem, u8_t count);
199 void sys_sem_signal(sys_sem_t *sem);
208 u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout);
214 void sys_sem_free(sys_sem_t *sem);
216 #define sys_sem_wait(sem) sys_arch_sem_wait(sem, 0)
222 int sys_sem_valid(sys_sem_t *sem);
229 void sys_sem_set_invalid(sys_sem_t *sem);
235 #define sys_sem_valid_val(sem) sys_sem_valid(&(sem))
241 #define sys_sem_set_invalid_val(sem) sys_sem_set_invalid(&(sem))
/device/soc/rockchip/common/kernel/drivers/gpu/arm/bifrost/csf/
Dmali_kbase_csf_reset_gpu.c101 down_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_prevent_and_wait()
105 up_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_prevent_and_wait()
110 up_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_prevent_and_wait()
120 if (!down_read_trylock(&kbdev->csf.reset.sem)) in kbase_reset_gpu_try_prevent()
125 up_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_try_prevent()
130 up_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_try_prevent()
139 up_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_allow()
146 lockdep_assert_held_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_assert_prevented()
148 lockdep_assert_held(&kbdev->csf.reset.sem); in kbase_reset_gpu_assert_prevented()
159 lockdep_assert_held_read(&kbdev->csf.reset.sem); in kbase_reset_gpu_assert_failed_or_prevented()
[all …]
/device/board/unionman/unionpi_tiger/kernel/drivers/isp/drivers/v4l2_dev/inc/sys/
Dsystem_semaphore.h39 int32_t system_semaphore_init( semaphore_t *sem );
55 int32_t system_semaphore_raise( semaphore_t sem );
70 int32_t system_semaphore_wait( semaphore_t sem, uint32_t timeout_ms );
81 int32_t system_semaphore_destroy( semaphore_t sem );
/device/soc/rockchip/common/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/include/
Dosl_ext.h140 osl_ext_status_t osl_ext_sem_create(char *name, int init_cnt, osl_ext_sem_t *sem);
153 osl_ext_status_t osl_ext_sem_delete(osl_ext_sem_t *sem);
167 osl_ext_status_t osl_ext_sem_give(osl_ext_sem_t *sem);
187 osl_ext_status_t osl_ext_sem_take(osl_ext_sem_t *sem, osl_ext_time_ms_t timeout_msec);
693 #define OSL_EXT_SEM_DECL(sem) argument
718 #define osl_ext_sem_create(name, init_cnt, sem) (OSL_EXT_SUCCESS) argument
719 #define osl_ext_sem_delete(sem) (OSL_EXT_SUCCESS) argument
720 #define osl_ext_sem_give(sem) (OSL_EXT_SUCCESS) argument
721 #define osl_ext_sem_take(sem, timeout_msec) (OSL_EXT_SUCCESS) argument
/device/board/kaihong/khdvk_3566b/wifi/bcmdhd_hdf/bcmdhd/include/
Dosl_ext.h135 osl_ext_sem_t *sem);
148 osl_ext_status_t osl_ext_sem_delete(osl_ext_sem_t *sem);
162 osl_ext_status_t osl_ext_sem_give(osl_ext_sem_t *sem);
182 osl_ext_status_t osl_ext_sem_take(osl_ext_sem_t *sem,
697 #define OSL_EXT_SEM_DECL(sem) argument
722 #define osl_ext_sem_create(name, init_cnt, sem) (OSL_EXT_SUCCESS) argument
723 #define osl_ext_sem_delete(sem) (OSL_EXT_SUCCESS) argument
724 #define osl_ext_sem_give(sem) (OSL_EXT_SUCCESS) argument
725 #define osl_ext_sem_take(sem, timeout_msec) (OSL_EXT_SUCCESS) argument
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/net/wireless/bcmdhd/include/
Dosl_ext.h140 osl_ext_status_t osl_ext_sem_create(char *name, int init_cnt, osl_ext_sem_t *sem);
153 osl_ext_status_t osl_ext_sem_delete(osl_ext_sem_t *sem);
167 osl_ext_status_t osl_ext_sem_give(osl_ext_sem_t *sem);
187 osl_ext_status_t osl_ext_sem_take(osl_ext_sem_t *sem, osl_ext_time_ms_t timeout_msec);
622 #define OSL_EXT_SEM_DECL(sem) argument
647 #define osl_ext_sem_create(name, init_cnt, sem) (OSL_EXT_SUCCESS) argument
648 #define osl_ext_sem_delete(sem) (OSL_EXT_SUCCESS) argument
649 #define osl_ext_sem_give(sem) (OSL_EXT_SUCCESS) argument
650 #define osl_ext_sem_take(sem, timeout_msec) (OSL_EXT_SUCCESS) argument
/device/soc/esp/esp32/components/bt/common/osi/include/osi/
Dsemaphore.h34 int osi_sem_new(osi_sem_t *sem, uint32_t max_count, uint32_t init_count);
36 void osi_sem_free(osi_sem_t *sem);
38 int osi_sem_take(osi_sem_t *sem, uint32_t timeout);
40 void osi_sem_give(osi_sem_t *sem);
/device/soc/winnermicro/wm800/board/src/bt/blehost/porting/w800/include/os/
Dnpl_freertos.h45 ble_npl_error_t npl_freertos_sem_init(struct ble_npl_sem *sem, uint16_t tokens);
46 ble_npl_error_t npl_freertos_sem_deinit(struct ble_npl_sem *sem);
48 ble_npl_error_t npl_freertos_sem_pend(struct ble_npl_sem *sem,
51 ble_npl_error_t npl_freertos_sem_release(struct ble_npl_sem *sem);
52 uint16_t npl_freertos_get_sem_count(struct ble_npl_sem *sem);
/device/board/isoftstone/yangfan/kernel/src/driv/net/rockchip_wlan/rkwifi/bcmdhd/include/
Dosl_ext.h130 osl_ext_status_t osl_ext_sem_create(char *name, int init_cnt, osl_ext_sem_t *sem);
143 osl_ext_status_t osl_ext_sem_delete(osl_ext_sem_t *sem);
157 osl_ext_status_t osl_ext_sem_give(osl_ext_sem_t *sem);
177 osl_ext_status_t osl_ext_sem_take(osl_ext_sem_t *sem, osl_ext_time_ms_t timeout_msec);
686 #define OSL_EXT_SEM_DECL(sem) argument
711 #define osl_ext_sem_create(name, init_cnt, sem) (OSL_EXT_SUCCESS) argument
712 #define osl_ext_sem_delete(sem) (OSL_EXT_SUCCESS) argument
713 #define osl_ext_sem_give(sem) (OSL_EXT_SUCCESS) argument
714 #define osl_ext_sem_take(sem, timeout_msec) (OSL_EXT_SUCCESS) argument
/device/soc/bestechnic/bes2600/liteos_m/components/drivers/touch/
Dtouch.c54 if (osSemaphoreAcquire(dev->sem, osWaitForever) != 0) { in touch_task()
92 dev->sem = osSemaphoreNew(1, 0, NULL); in TouchOpen()
93 if (dev->sem == NULL) { in TouchOpen()
131 if (dev->sem) { in TouchClose()
132 osSemaphoreDelete(dev->sem); in TouchClose()
133 dev->sem = NULL; in TouchClose()

123