User-space interrupts
User-space interrupts
Posted Oct 13, 2021 23:23 UTC (Wed) by mpr22 (subscriber, #60784)In reply to: User-space interrupts by neilbrown
Parent article: User-space interrupts
When an idea involves normalizing the use of longjmp() in code written by mere mortals, that creates in my mind the (theoretically, but probably not practically, rebuttable) presumption that the idea is absolutely terrible.
Posted Oct 14, 2021 17:18 UTC (Thu)
by anton (subscriber, #25547)
[Link]
I found writing a signal handler more of a challenge than performing the longjmp() (and I don't remember ever having a bug due to the longjmp()). The problem is that asynchronous signals can be invoked anywhere, including in the middle of updating some data structure, so you have a chance of corrupting the data structure if you longjmp() out of a signal handler for an asynchronous signal.
User-space interrupts