10 years, 1 month ago.

what exactly are signals??

what is the use of the signal_wait, or signal_set??? i cant find a use for it and i dont understand where does the signal come in hand in the example

Question relating to:

2 Answers

5 years, 8 months ago.

For any future readers, since I find that mbed is not very beginner friendly...

If you find the mbed ways too difficult, you can use this guide for Keil CMSIS RTOS as well. https://www.keil.com/pack/doc/CMSIS/RTOS/html/CMSIS_RTOS_Tutorial.pdf

I've done a little program which uses signalling in the way specified in that tutorial: https://os.mbed.com/users/Ritzerk/code/RTOS-Example-RTOS-Interrupt-as-Thread-us/

Hope it helps.

10 years ago.

It's a thread-safe way of signalling between threads. You can have one or more threads call signal_wait(), and they will block until another calls signal_set(). You can have up to `osFeature_Signals` (probably 8; max 31) signals in each thread, and threads can wait for a comination of signals by using the `int32_t signals` bitmask.

See http://www.keil.com/pack/doc/cmsis/RTOS/html/group___c_m_s_i_s___r_t_o_s___signal_mgmt.html