aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/pthread.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-17libthread: handle spurious _procsleep wakeups, fix $LIBTHREAD handlingRuss Cox1-1/+3
2020-05-17libthread: add pthreadperthread mode and use under ASANRuss Cox1-0/+33
ASAN can't deal with the coroutine stacks. In theory we can call into ASAN runtime to let it know about them, but ASAN still has problems with fork or exit happening from a non-system stack. Bypass all possible problems by just having a full OS thread for each libthread thread. The threads are still cooperatively scheduled within a proc (in thos mode, a group of OS threads). Setting the environment variable LIBTHREAD=pthreadperthread will enable the pthreadperthread mode, as will building with CC9FLAGS='-fsanitize=address' in $PLAN9/config. This solution is much more general than ASAN - for example if you are trying to find all the thread stacks in a reproducible crash you can use pthreadperthread mode with any debugger that knows only about OS threads.
2005-02-03stupid gccrsc1-1/+1
2005-01-18better exit handlingrsc1-3/+4
2005-01-17allow config to override kernel versionrsc1-0/+17
2005-01-07sunos fixesrsc1-3/+3
2005-01-06add _procwakeupandunlockrsc1-0/+10
to help ease locking contention on Linux 2.4.
2004-12-28restore old plan 9 property that when thersc1-0/+5
last thread exits the main proc, the remaining program ends up in the background and the program appears to have exited.
2004-12-28more freebsd workrsc1-4/+0
2004-12-28remove debuggingrsc1-0/+6
2004-12-27better exec handlingrsc1-6/+0
2004-12-27shuffle to allow use of execchan in non-pthreads implsrsc1-0/+6
2004-12-27start linux pre-2.6 portrsc1-3/+3
2004-12-27confine pthreads to pthread.crsc1-5/+29
2004-12-27signal handling, add prototype for pthreadinitrsc1-1/+1
2004-12-25more new libthreadrsc1-0/+108
2004-12-25New thread libraryrsc1-271/+0
2004-11-08more thread workrsc1-86/+182
2004-10-22try to implement the daemonize hack.rsc1-20/+28
2004-10-22debugging, more pthreads craprsc1-1/+4
2004-09-23add pthreadrsc1-0/+164