In this example the first thread (the main () function) sends signals to the second thread at regular intervals. The second thread waits until an event signal does not arrive. Each time the signal arrives, the program toggles the status of LED1. Note, that the return value of the Thread :: signal_wait () function is examined and is printed out as well. Just for fun thread2: accepts any signal, and thead1 provides all possible signals from 1 to 32768.
István Cserny
/
Lab08_rtos_signals