Migrate signal code from pthread.c to signal.c
authorKevin Klues <klueska@cs.berkeley.edu>
Wed, 11 Nov 2015 03:00:04 +0000 (19:00 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 16 Nov 2015 23:15:03 +0000 (15:15 -0800)
commit1a1c326edb336bbe9f026a8c7b38b89c9a3c6023
tree17f09b775bb4a97d4987a1f427c89a544ac5d4e6
parentadeb4a08c5ebf3bdeb9251aa510ab57e85fa6d09
Migrate signal code from pthread.c to signal.c

Previously all of the code to support intraprocess signals was isolated
to the pthread library.  However, the actual functionality it provided
was quite generic.  This commit pushes all of that code into
parlib/signal.c and makes uthreads aware of the ability handle posix
signals. It is still up to the specific 2LS to actually use these
facilities in their scheduler though. For 2LSs that don't require posix
signals, the only waste is a few words in the uthread struct, and a few
unnecessary instructions to clear these fields when a uthread is first
initialized.  There is no actual performance hit unless the APIs from
parlib/signal.h are actually called (as they are in pthread.c now).

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/parlib/include/signal.h
user/parlib/include/uthread.h
user/parlib/signal.c
user/parlib/uthread.c
user/pthread/pthread.c
user/pthread/pthread.h