Binary semaphore

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi

Our project is using the SDK 3.1.2 with ThreadX and Nex_Duo. We want to use a binary semaphore that is triggered from an IRQ. The existing semaphore API host_rtos_init_semaphore() and wiced_rtos_init_semaphore() both are the counting semaphore. Can you provide a  binary semaphore API?

Thanks

0 Likes
2 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

On semaphore creation the Initial count in host_rtos_init_semaphore(...) is set to 0.

There are may places the semaphores are used. One example is to synchronized printing from threads are it can be found here, Create, Join and Delete Threads with WICED APIs.

Seyhan

0 Likes
Anonymous
Not applicable

Hi,

The host_rtos_set_semaphore() always increments the number of the semaphore count. This is a counting semaphore API. Can you provide a  binary semaphore API. The host_rtos_set_semaphore()  can only set the 1 value of the semaphore.

Thanks

0 Likes