We have the following code in VxWorks:
sig_hdr () { ... }
task_low_priority() {
...
// Install signal handler for SIGUSR1
signal(SIGUSR1, sig_hdr);
...
}
task_high_priority() {
...
kill(pid, SIGUSR1); //pid is the ID of task_low_priority
...
}
The high priority task sends a signal (via kill) to the low priority task. Will the high priority task be pre-empted and the low priority task execute right away, or will the signal be deferred until the low priority task gets to run?