Date: Tue, 13 Jun 2023 09:29:52 +0000
From: Austin Group Bug Tracker <[email protected]>
Message-ID: <[email protected]>
| You don't seem to have considered the case where the thread that receives
| the signal is currently running, and is executing user code.
No, that's one of the shortish pending cases.
| Then there is
| nothing to delay the delivery - it can happen immediately after generation,
No, it can't in that case, it needs to wait until the process enters the
kernel for some reason. Typically if a signal is delivered to a process
while it is in application mode, it will be the result of a kill() from
another process running on a different CPU (anything the process does to
itself, including traps, result in the process being in the kernel when
the signal is delivered - the kernel side of the process is posting the
signal to itself). When that happens, the other CPU (the one running the
application) needs to be notified that there's an event it needs to process,
which will result in that process being (temporarily) suspended and the
kernel taking over. When that is done (which may be immediate, or may
be later if the cpu in consideration switches to some other process) and
the kernel is returning control to the application, is when the signal is
delivered. In the interim period (which may be very short, or may be
lengthy (in computer terms anyway)) the signal is pending. But not blocked.
(Of course, that is assuming it wasn't being blocked).
| Having said that, it would make sense to reword to avoid any subtle
| distinctions about exactly when a signal becomes pending. I will try to
| come up with something that merges parts of your suggestion with parts of
| my previous attempt.
Your new version looks OK to me. Still not sure the APPLICATION USAGE
section is needed however.
kre