Commit Graph

5 Commits

Author SHA1 Message Date
John Birrell
4a027d50c7 Change signal model to match POSIX (i.e. one set of signal handlers
for the process, not a separate set for each thread). By default, the
process now only has signal handlers installed for SIGVTALRM, SIGINFO
and SIGCHLD. The thread kernel signal handler is installed for other
signals on demand. This means that SIG_IGN and SIG_DFL processing is now
left to the kernel, not the thread kernel.

Change the signal dispatch to no longer use a signal thread, and
call the signal handler using the stack of the thread that has the
signal pending.

Change the atomic lock method to use test-and-set asm code with
a yield if blocked. This introduces separate locks for each type
of object instead of blocking signals to prevent a context
switch. It was this blocking of signals that caused the performance
degradation the people have noted.

This is a *big* change!
1998-04-29 09:59:34 +00:00
John Birrell
af139b98d4 Allow a thread dump to report the thread's sigmask when in the
PS_SIGWAIT state.
1998-04-17 09:39:37 +00:00
John Birrell
d60f0fa60d Change the FILE locking to be by FILE, not by the underlying fd as
it was. Add a FILE_WAIT state and queue threads waiting for a FILE
lock. Start using the sys/queue.h macros instead of the way that MIT
pthreads did it.

Add a thread name to the private thread structure and a non-POSIX
function to set this. This helps (me at least) when sending a SIGINFO
to a threaded process to get a /tmp/uthread.dump to see what the
<expletive deleted> threads are doing this time. It is nice to be
able to recognise (yes, I spell that with an 's' too) which threads
are which.
1998-04-11 07:47:22 +00:00
Julian Elischer
c840cec7c5 Submitted by: John Birrell
uthreads update from the author.
1997-02-05 23:26:09 +00:00
Julian Elischer
012dfd00b3 Reviewed by: julian
Submitted by:	 john birrel

One version of the pthreads library
another will follow with differnt actions under some cases..
not QUITE complete
1996-01-22 00:23:58 +00:00