plan9fox/sys/src/libthread
cinap_lenrek 5a807265a8 libthread: fix debug prints, simplify
Do the debuglevel check before calling the print
function for _threaddebug, by making it a macro.
Do not waste cycles passing arguments.

Generalize the _threaddebug function into _threadprint()
and add a varargcheck pragma. This function can
also be used from _threadassert().

Fix missing arguments in one case, fix trailing
newlines in _threaddebug().

Make _threadgetproc()/_threadsetproc() a macro,
just dereferencing Proc**_threadprocp.

Simplify the mainjump, just call _threadsetproc()
directly without that mainp dance. Remove the
_schedinit() argument, it uses _threadgetproc() now.
Get rid of Mainarg struct, just have a global variable
for argc.
2021-10-13 17:08:26 +00:00
..
386.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
amd64.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
arm.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
arm64.c libthread: initial support for arm64 2019-05-03 21:03:12 +02:00
channel.c libthread: fix debug prints, simplify 2021-10-13 17:08:26 +00:00
chanprint.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
create.c libthread: deal with _schedfork() and _schedexec() returning -1 2021-10-12 00:49:12 +00:00
debug.c libthread: fix debug prints, simplify 2021-10-13 17:08:26 +00:00
example.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
exec.c libthread: deal with _schedfork() and _schedexec() returning -1 2021-10-12 00:49:12 +00:00
exit.c libthread: deal with _schedfork() and _schedexec() returning -1 2021-10-12 00:49:12 +00:00
id.c libthread: deal with _schedfork() and _schedexec() returning -1 2021-10-12 00:49:12 +00:00
iocall.c libthread: make ioproc even when opening /proc/n/ctl fails (factotum) 2012-04-03 22:10:19 +02:00
ioclose.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
iodial.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ioflush.c libthread: reimplemented i/o procs using new interrupt ctl message 2011-08-22 03:03:27 +02:00
ioopen.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ioproc.c libthread: reduce stack usage for ioprocs, open /proc/n/ctl with OCEXEC flag 2020-12-07 14:29:45 +01:00
ioread.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ioreadn.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
iosleep.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
iowrite.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
kill.c libthread: reduce stack usage of threadkill*(), open /proc/n/ctl with OCEXEC flag 2020-12-07 14:31:02 +01:00
lib.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
main.c libthread: fix debug prints, simplify 2021-10-13 17:08:26 +00:00
mips.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mkfile libthread: generate correct acid files 2021-04-09 16:48:07 +02:00
note.c libthread: fix debug prints, simplify 2021-10-13 17:08:26 +00:00
power.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ref.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
rendez.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
sched.c libthread: fix debug prints, simplify 2021-10-13 17:08:26 +00:00
test.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
threadimpl.h libthread: fix debug prints, simplify 2021-10-13 17:08:26 +00:00
tprimes.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00