FAZLOV VICTOR(deleted)
|
Question about synchronization of real-time threads by signals.
|
FAZLOV VICTOR(deleted)
05/25/2020 5:21 AM
post120680
|
Question about synchronization of real-time threads by signals.
• Hello.
Question about synchronization of real-time threads by signals.
Test task:
- create 2 real-time streams.
- the interval for starting the thread is provided by an interval timer.
- each thread has its own timer, time interval, priority, and real-time signal (from SIGRTMIN ...SIGRTMAX range).
When the time interval expires, the timer generates an event with its own number.
The thrrad is waiting for a signal from the timer ( sigwait (&set, &sigw);). When the timer signal arrives, the thread
must perform certain operations (I have an increased counter). If you use special sigrtmax + 7 or SIGRTMAX + 8 signals
in the task, the task is completed. If you use real-time signals SIGRTMIN+1, SIGRTMIN+2, the task is not performed. the
Threads go to SUSPEND mode and work only when you click the RESUME button. (see the screenshot )
In this process, real-time signals are converted into special signals according to the documentation. (Real-time
operating system QNX Neutrino 6.5. System architecture. Inter-task interaction in QNX Neutrino OS. Events.)
Text from the program:
struct sigaction action;
sigemptyset(&set);
sigaddset(&set,SIGNALTIMER100);
sigaddset(&set,SIGNALTIMER50);
act.__sa_un._sa_handler= SIG_DFL;
act.sa_flags =SA_SIGINFO;
sigaction(SIGNALTIMER100, &act, NULL);
sigaction(SIGNALTIMER50, &act, NULL);
sigprocmask(SIG_BLOCK, &set, NULL);//
Tell me where the error is ?
Can you give a link to an example of implementing such threads?
Why signals don't become "special".
I attach the program text.
|
|
|