min.yang77@yahoo.com [nuttx]
2018-01-23 21:43:34 UTC
Hello,
I implement a periodic posix timer with two threads. The setup is below.
In thread 1, I create a timer with a signal number and signal handler. I have a sem_wait function to test if a signal is received.
In thread 2, I have a sem_wait function just to test if a signal is received.
When running the program, I realized that when timer expires, the signal always goes to thread 1 and never goes to thread 2.
As my understand, signal's scope is based on task in nuttx, not a thread. So I expect thread 2 to receive signal as well. Could you please help explain this situation?
Thanks,
Min
I implement a periodic posix timer with two threads. The setup is below.
In thread 1, I create a timer with a signal number and signal handler. I have a sem_wait function to test if a signal is received.
In thread 2, I have a sem_wait function just to test if a signal is received.
When running the program, I realized that when timer expires, the signal always goes to thread 1 and never goes to thread 2.
As my understand, signal's scope is based on task in nuttx, not a thread. So I expect thread 2 to receive signal as well. Could you please help explain this situation?
Thanks,
Min