diff options
author | Christopher Faylor <me@cgf.cx> | 2003-11-29 00:26:40 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-11-29 00:26:40 +0000 |
commit | 62e070d72ead4e5376e1cc43bf5340b4c2888fc5 (patch) | |
tree | 364befe95998eea84b56d7610526b34976618b40 /winsup/cygwin/how-signals-work.txt | |
parent | 13584f077b708083b9e1cba78ff580c7bae6130e (diff) | |
download | newlib-62e070d72ead4e5376e1cc43bf5340b4c2888fc5.zip newlib-62e070d72ead4e5376e1cc43bf5340b4c2888fc5.tar.gz newlib-62e070d72ead4e5376e1cc43bf5340b4c2888fc5.tar.bz2 |
* pinfo.h (_pinfo::getthread2signal): Remove obsolete function.
* cygtls.h (_threadinfo): Define tid more precisely.
(_threadinfo::operator HANDLE): Define.
* exceptions.cc (_threadinfo::interupt_now): Use _threadinfo HANDLE operator to
derive thread handle.
(setup_handler): Ditto.
* sigproc.cc: Reorganize includes.
Diffstat (limited to 'winsup/cygwin/how-signals-work.txt')
-rw-r--r-- | winsup/cygwin/how-signals-work.txt | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/winsup/cygwin/how-signals-work.txt b/winsup/cygwin/how-signals-work.txt index b890e31..f5cb04a 100644 --- a/winsup/cygwin/how-signals-work.txt +++ b/winsup/cygwin/how-signals-work.txt @@ -6,17 +6,11 @@ On process startup, cygwin starts a secondary thread that deals with signals. This thread contains a loop which blocks waiting for information to show up on a pipe whose handle (sendsig) is currently stored in _pinfo (this may change). -If one of these is activated, then the the signal handler inspects an -array of integers looking for a non-zero value. The array corresponds -to the normal UNIX signals + two extra locations for internal usage. -This array is located in the 'sigtodo' array in the procinfo class. - -The signal thread uses the InterlockedDecrement function to atomically -inspect elements of the array. If one one of the elements of the array -is non-zero, then cygwin checks to see if the user has blocked the -signal by inspecting the process signal mask. If the signal is blocked, -then the current array element is reincremented and the next element is -checked. +Communication on the sendsig pipe is via the 'sigelem' structure. This +structure is filled out by the sig_send function with information about the +signal being sent, such as (as of this writing) the signal number, the +originating pid, the originating thread, and the address of the mask to +use (this may change). If the signal is not blocked, then the function "sig_handle" is called with the signal number as an argument. This is a fairly straightforward |