aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/channel.c
Commit message (Collapse)AuthorAgeFilesLines
* libthread: add pthreadperthread mode and use under ASANRuss Cox2020-05-171-1/+1
| | | | | | | | | | | | | | | | | | 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: fix nbrecvul, recvul to match man page, Plan 9Russ Cox2020-01-131-2/+2
| | | | | | | They return 0 on failure, not -1. Bug introduced in my original libthread-for-Unix code. Fixes #230.
* Trivial changes: whitespace and modes.Dan Cross2020-01-101-3/+2
| | | | | | | | | 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: fix no-receive nbrecv etc. bug (David Jeannot)Russ Cox2008-05-061-8/+12
|
* libthread: input sanity checksRuss Cox2008-05-051-2/+3
|
* libthread: simplify alt tracking, possibly fixing bugRuss Cox2007-08-221-7/+8
|
* Many small edits.rsc2005-01-131-0/+1
|
* more freebsd workrsc2004-12-281-3/+0
|
* confine pthreads to pthread.crsc2004-12-271-0/+2
|
* more new libthreadrsc2004-12-251-0/+412
|
* New thread libraryrsc2004-12-251-500/+0
|
* more thread workrsc2004-11-081-13/+5
|
* Continue switching library over to pthreads when possible.rsc2004-09-171-3/+3
| | | | | Tprimes works on Linux 2.6. You can only have 128 procs though.
* Rewrite to remove dependence on rendezvous and its bizarrersc2004-09-171-25/+18
| | | | | | | data structures. Makes it easier to use pthreads too. Still need to add code for non-pthreads systems. Just a checkpoint to switch work to another machine.
* odds and endsrsc2004-04-211-1/+1
|
* Tweaks to make libthread tell Valgrind about its stack limits,rsc2004-04-211-1/+1
| | | | so that Valgrind can detect stack overflow for me.
* Small bug fixes.rsc2004-03-051-2/+2
|
* Various little fixes.rsc2004-03-051-1/+0
|
* Debugging libthread for acme.rsc2004-03-051-10/+39
|
* Fighting the good fight.rsc2004-02-291-8/+10
| | | | | | | | | | | | Move libfmt, libutf into subdirectories of lib9. Add poll-based socket i/o to libthread, so that we can avoid using multiple procs when possible, thus removing dependence on crappy pthreads implementations. Convert samterm, acme to the single-proc libthread. Bring libcomplete, acme up-to-date w.r.t. Plan 9 distribution.
* Changes for Mac OS X. Most important is stack sizes in samterm,rsc2003-11-241-1/+1
| | | | | | which were completely bogus. (Libthread used to ignore them but not anymore. Maybe we really should ignore them, but that breaks Venti, which needs *really* big stacks.)
* Initial revisionrsc2003-09-301-0/+485