X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Finternals%2Fsignals.texinfo;h=e5cfceb4d39d019f16376b173ad728eaebc9c94e;hb=ae09f8fd7765f6cab6ad317a13e27ff22ab0c11e;hp=dc2b3a69a68d59e0b4dee823e31f226408cc635b;hpb=ce027af4a3f623440d33e7be119fe46caaecee65;p=sbcl.git diff --git a/doc/internals/signals.texinfo b/doc/internals/signals.texinfo index dc2b3a6..e5cfceb 100644 --- a/doc/internals/signals.texinfo +++ b/doc/internals/signals.texinfo @@ -73,20 +73,6 @@ is deferred by pseudo atomic and @code{WITHOUT-GCING}. @node Implementation warts @section Implementation warts -@subsection RT signals - -Sending and receiving the same number of signals is crucial for -@code{INTERRUPT-THREAD} and @code{sig_stop_for_gc}, hence they are -real-time signals for which the kernel maintains a queue as opposed to -just setting a flag for ``sigint pending''. - -Note, however, that the rt signal queue is finite and on current linux -kernels a system wide resource. If the queue is full, SBCL tries to -signal until it succeeds. This behaviour can lead to deadlocks, if a -thread in a @code{WITHOUT-INTERRUPTS} is interrupted many times, -filling up the queue and then a gc hits and tries to send -@code{SIG_STOP_FOR_GC}. - @subsection Miscellaneous issues Signal handlers should automatically restore errno and fp @@ -159,6 +145,10 @@ derive the rule: in a @code{WITHOUT-GCING} form (or pseudo atomic for that matter) never wait for another thread that's not in @code{WITHOUT-GCING}. +Somewhat of a special case, it is enforced by the runtime that +@code{SIG_STOP_FOR_GC} and @code{SIG_RESUME_FROM_GC} always unblocked +when we might trigger a gc (i.e. on alloc or calling into Lisp). + @subsection Calling user code For the reasons above, calling user code, i.e. functions passed in, or