summaryrefslogtreecommitdiffstats
path: root/src/libthread/thread.c
Commit message (Collapse)AuthorAgeFilesLines
* libthread: handle spurious _procsleep wakeups, fix $LIBTHREAD handlingRuss Cox2020-05-171-5/+23
|
* libthread: add pthreadperthread mode and use under ASANRuss Cox2020-05-171-6/+64
| | | | | | | | | | | | | | | | | | 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.
* libthread: comment stack border a bit moreRuss Cox2020-01-241-4/+10
|
* libthread: use mmap to allocate OpenBSD stacksRuss Cox2020-01-141-2/+7
| | | | | | | Should fix faults on OpenBSD. Fixes #218. Fixes #226.
* libthread: fix fault in teardown of procRuss Cox2020-01-131-0/+1
| | | | Fixes #332.
* libthread: run first thread in proc on system stackRuss Cox2020-01-121-14/+45
| | | | | | | For pthread systems that are fussy about which stack is used, this makes sure that threadmain runs on a system stack. If you only use proccreate (never threadcreate), all threads run on system stacks.
* Trivial changes: whitespace and modes.Dan Cross2020-01-101-13/+11
| | | | | | | | | Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
* libthread: Lion context routinesRuss Cox2011-10-131-1/+3
|
* build: OS X 64-bit buildRuss Cox2011-08-021-1/+6
| | | | | R=rsc http://codereview.appspot.com/4838047
* libthread: make page work on OS XRuss Cox2009-08-171-0/+4
|
* libthread: work around gcc warning on FreeBSDRuss Cox2008-12-231-1/+1
|
* libthread: correct sysfatal handler prototypeRuss Cox2008-10-261-4/+2
|
* libthread: add proper sysfatalTim Wiess2008-07-201-0/+16
|
* libthread: abort on single-threaded lock contentionRuss Cox2008-07-091-0/+24
|
* libthread: fix 64-bit bug in threadstart (Nathaniel Filardo)Russ Cox2008-06-011-1/+1
|
* libthread: remove bogus write in threadmainRuss Cox2008-02-281-1/+0
|
* pinrsc2006-06-261-0/+52
|
* fix proc leak; add p9usepwlibraryrsc2006-06-121-1/+8
|
* put threadinfo backrsc2006-04-211-1/+1
|
* darwin 386 startrsc2006-04-211-1/+2
|
* Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.rsc2006-04-011-13/+13
|
* add threadidlersc2006-02-071-2/+29
|
* add threadidrsc2006-02-051-0/+9
|
* Print information on SIGQUIT, SIGINFO.rsc2005-09-261-0/+41
|
* Log if _threaddebuglevel is set.rsc2005-09-261-5/+2
|
* sunrsc2005-07-271-1/+1
|
* use full prototypesrsc2005-05-071-1/+1
|
* no need to setproc(0)rsc2005-03-181-1/+0
|
* add threaddatarsc2005-03-181-0/+6
|
* add check for procscheduler returningrsc2005-02-161-0/+1
|
* hard-to-find locking bugrsc2005-02-151-5/+19
|
* different fix for main proc bugrsc2005-02-141-11/+21
|
* work around stupid linux bugrsc2005-02-131-0/+8
|
* rename scheduler to have a more distinctive name, so stack traces can end therersc2005-01-231-5/+5
|
* Apparently SuSE 9.1's X distribution uses even biggerrsc2005-01-231-1/+1
| | | | | | | | | | buffers than the standard ones. 64kB appears to be enough for a stack in that case, but let's just go nuts and make the stacks enormous, so that it takes a few more doublings of X's stack needs before we run into this problem again. The VM system should take care of not actually using most of the memory anyway.
* proccreate racersc2005-01-181-1/+3
|
* add threadgetnamersc2005-01-181-0/+6
|
* 64-bit nonsensersc2005-01-181-3/+19
|
* useful warning commentrsc2005-01-161-0/+9
|
* oops sunosrsc2005-01-141-3/+3
|
* Many small edits.rsc2005-01-131-5/+15
|
* paranoiarsc2005-01-111-1/+8
|
* os x changesrsc2005-01-111-2/+13
|
* allow lock passingrsc2005-01-071-1/+2
|
* add _procwakeupandunlockrsc2005-01-061-2/+4
| | | | | to help ease locking contention on Linux 2.4.
* more debuggingrsc2005-01-061-4/+16
|
* more debuggingrsc2005-01-041-6/+16
|
* restore old plan 9 property that when thersc2004-12-281-1/+4
| | | | | | last thread exits the main proc, the remaining program ends up in the background and the program appears to have exited.
* more freebsd workrsc2004-12-281-4/+1
|
* add threaddaemonize(), more bug fixesrsc2004-12-281-4/+33
|