Home
last modified time | relevance | path

Searched refs:semaphore_id (Results 1 – 10 of 10) sorted by relevance

/Zephyr-latest/subsys/portability/cmsis_rtos_v2/
Dsemaphore.c60 osStatus_t osSemaphoreAcquire(osSemaphoreId_t semaphore_id, uint32_t timeout) in osSemaphoreAcquire() argument
62 struct cv2_sem *semaphore = (struct cv2_sem *) semaphore_id; in osSemaphoreAcquire()
65 if (semaphore_id == NULL) { in osSemaphoreAcquire()
92 uint32_t osSemaphoreGetCount(osSemaphoreId_t semaphore_id) in osSemaphoreGetCount() argument
94 struct cv2_sem *semaphore = (struct cv2_sem *)semaphore_id; in osSemaphoreGetCount()
96 if (semaphore_id == NULL) { in osSemaphoreGetCount()
106 osStatus_t osSemaphoreRelease(osSemaphoreId_t semaphore_id) in osSemaphoreRelease() argument
108 struct cv2_sem *semaphore = (struct cv2_sem *) semaphore_id; in osSemaphoreRelease()
110 if (semaphore_id == NULL) { in osSemaphoreRelease()
128 osStatus_t osSemaphoreDelete(osSemaphoreId_t semaphore_id) in osSemaphoreDelete() argument
[all …]
/Zephyr-latest/subsys/portability/cmsis_rtos_v1/
Dcmsis_semaphore.c45 int32_t osSemaphoreWait(osSemaphoreId semaphore_id, uint32_t timeout) in osSemaphoreWait() argument
47 struct k_sem *semaphore = (struct k_sem *) semaphore_id; in osSemaphoreWait()
50 if (semaphore_id == NULL) { in osSemaphoreWait()
82 osStatus osSemaphoreRelease(osSemaphoreId semaphore_id) in osSemaphoreRelease() argument
84 struct k_sem *semaphore = (struct k_sem *) semaphore_id; in osSemaphoreRelease()
86 if (semaphore_id == NULL) { in osSemaphoreRelease()
103 osStatus osSemaphoreDelete(osSemaphoreId semaphore_id) in osSemaphoreDelete() argument
105 struct k_sem *semaphore = (struct k_sem *) semaphore_id; in osSemaphoreDelete()
107 if (semaphore_id == NULL) { in osSemaphoreDelete()
/Zephyr-latest/tests/subsys/portability/cmsis_rtos_v2/src/
Dsemaphore.c73 osSemaphoreId_t semaphore_id; in ZTEST() local
77 semaphore_id = osSemaphoreNew(1, 1, &sema_attr); in ZTEST()
78 zassert_true(semaphore_id != NULL, "semaphore creation failed"); in ZTEST()
80 name = osSemaphoreGetName(semaphore_id); in ZTEST()
84 id = osThreadNew(thread_sema, semaphore_id, &thread_attr); in ZTEST()
87 zassert_true(osSemaphoreGetCount(semaphore_id) == 1); in ZTEST()
93 status = osSemaphoreAcquire(semaphore_id, osWaitForever); in ZTEST()
96 zassert_true(osSemaphoreGetCount(semaphore_id) == 0); in ZTEST()
106 status = osSemaphoreRelease(semaphore_id); in ZTEST()
115 status = osSemaphoreDelete(semaphore_id); in ZTEST()
/Zephyr-latest/tests/subsys/portability/cmsis_rtos_v1/src/
Dsemaphore.c54 osSemaphoreId semaphore_id; in ZTEST() local
56 semaphore_id = osSemaphoreCreate(osSemaphore(semaphore_1), 1); in ZTEST()
57 zassert_true(semaphore_id != NULL, "semaphore creation failed"); in ZTEST()
59 id = osThreadCreate(osThread(thread_sema), semaphore_id); in ZTEST()
62 zassert_true(osSemaphoreWait(semaphore_id, osWaitForever) > 0, in ZTEST()
69 status = osSemaphoreRelease(semaphore_id); in ZTEST()
74 status = osSemaphoreDelete(semaphore_id); in ZTEST()
/Zephyr-latest/tests/benchmarks/thread_metric/src/
Dtm_porting_layer_zephyr.c153 int tm_semaphore_create(int semaphore_id) in tm_semaphore_create() argument
156 return k_sem_init(&test_sem[semaphore_id], 1, 1); in tm_semaphore_create()
163 int tm_semaphore_get(int semaphore_id) in tm_semaphore_get() argument
165 return k_sem_take(&test_sem[semaphore_id], K_NO_WAIT); in tm_semaphore_get()
172 int tm_semaphore_put(int semaphore_id) in tm_semaphore_put() argument
174 k_sem_give(&test_sem[semaphore_id]); in tm_semaphore_put()
Dtm_api.h88 int tm_semaphore_create(int semaphore_id);
89 int tm_semaphore_get(int semaphore_id);
90 int tm_semaphore_put(int semaphore_id);
/Zephyr-latest/include/zephyr/portability/
Dcmsis_os2.h612 const char *osSemaphoreGetName(osSemaphoreId_t semaphore_id);
618 osStatus_t osSemaphoreAcquire(osSemaphoreId_t semaphore_id, uint32_t timeout);
623 osStatus_t osSemaphoreRelease(osSemaphoreId_t semaphore_id);
628 uint32_t osSemaphoreGetCount(osSemaphoreId_t semaphore_id);
633 osStatus_t osSemaphoreDelete(osSemaphoreId_t semaphore_id);
Dcmsis_os.h519 int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec);
525 osStatus osSemaphoreRelease (osSemaphoreId semaphore_id);
531 osStatus osSemaphoreDelete (osSemaphoreId semaphore_id);
/Zephyr-latest/tests/benchmarks/thread_metric/
Dthread_metric_readme.txt186 int tm_semaphore_create(int semaphore_id);
191 int tm_semaphore_get(int semaphore_id);
196 int tm_semaphore_put(int semaphore_id);
/Zephyr-latest/doc/services/portability/
Dcmsis_rtos_v2.rst38 semaphore_id is in an invalid semaphore state) is not supported.