Commits


libthread: add pthreadperthread mode and use under ASAN 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 9 They return 0 on failure, not -1. Bug introduced in my original libthread-for-Unix code. Fixes #230.


Trivial changes: whitespace and modes. 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)


libthread: input sanity checks


libthread: simplify alt tracking, possibly fixing bug


Many small edits.


more freebsd work


confine pthreads to pthread.c


more new libthread