4 ms·
> What you've done is turned signals into interrupts, which is .. hokey No that is precisely what they are - user space interrupts. Thats how they work. That’s
by epcoa 3y ago
> What you've done is turned signals into interrupts, which is .. hokey
No that is precisely what they are - user space interrupts. Thats how they work. That’s why one has to worry about async safety and signal safe calls.
I have no idea where you get off on this “allowing a context switch” nonsense. In most of the systems being discussed, if a signal is delivered and the thread is runnable it will be delivered immediately and asynchronously - there is no queuing going on in that case. If the thread is not runnable/scheduled that’s another story but this does not square with what you’re saying, because it sounds strongly that you’re saying that signals are delivered synchronously (with context switches) and they are most definitely not, generally.
Also longjmp is an entirely user space concept - the kernel on the most common systems being discussed has no idea of its operation.