On 9236 day of my life fahree@gmail.com wrote:
Maybe you didn't realize that we were talking about Lisp and not C. Asynchronous interrupts at the Lisp level need not be asynchronous signals at the C level. Lisp interrupts can be either higher-level than the C level (already handling your sig_atomic_t and then doing something when back from the signal handler),
Then proper handling of sig_atomic_t is problem of Lisp system, not Lisp programmer.
or they can be lower-level (talking directly to the kernel, to avoid the limitations of the C library).
It's not limitation of C library, it is limitation of architecture. Layer of C library over signal API is too thin to limit something. No matter if you write you program in C, asm or Lisp, if processor can't write something atomically, you can't use it in async. interrupts.
For example, no matter which language you use, you can't atomically write or read 64-bit integer (aka long long) with x86 platform.