David Sheinberg(deleted)
|
timer_settime/SIGEV_SIGNAL_PULSE and SchedSet
|
David Sheinberg(deleted)
07/17/2020 11:59 PM
post120845
|
timer_settime/SIGEV_SIGNAL_PULSE and SchedSet
I'm trying to write a small driver that uses a periodic timer to initiate a DAC read from the SPI bus. It generally
works fine, but I wanted to be able to change the priority of the process using SchedSet. I've found that if I try to
wake up using the pulse variant of the timer event, I can't adjust the priority (the calls don't fail, but pidin
indicates my process is still running 10r). I can run the program using nice, and it works as expected, allowing me to
up the priority. But when I try to change internally using SchedSet, the priority doesn't seem to change. If, instead,
I use the SIGNAL_THREAD event, then I can handle the signal using sigaction/sa_handler and my MsgReceive will wake up.
In this mode, my SchedSet works and priorities can be changed. The latter version is actually fine, but I was curious
what timer_settime does behind the scenes when sending pulses that prevents my call to SchedSet from working as I expect
?
|
|
|