summaryrefslogtreecommitdiff
path: root/sys/src/libthread
AgeCommit message (Collapse)Author
2021-10-13libthread: fix debug prints, simplifycinap_lenrek
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-12libthread: remove unused _workerdata() prototype from threadimpl.hcinap_lenrek
2021-10-12libthread: remove more garbage: _threadnotefd, _threadpasserpid.cinap_lenrek
2021-10-12libthread: remove unused skip() functioncinap_lenrek
2021-10-12libthread: deal with _schedfork() and _schedexec() returning -1cinap_lenrek
The current behaviour of the kernel to deadlock itself instead of returning an error on fork. This might change in the future, so prepare libthread to handle this case. For _schedfork(), we'r going to just retry forking on every switch, while for _schedexec(), the exec will fail and send ~0 down the pid channel.
2021-06-20threadimpl.h: remove Printsize as well (unused)Sigrid Solveig Haflínudóttir
2021-06-20threadimpl: remove unused fields from Proc structSigrid Solveig Haflínudóttir
2021-04-09libthread: generate correct acid filesHumm
/sys/src/cmd/mksyslib uses `{basename $stem .$objtype}^.c to get the source file name for *.acid files. /sys/lib/acid/thread expects sched.$objtype.acid. This lets /sys/src/libthread/mkfile generate that file.
2020-12-19libthread: remove unused _times() functioncinap_lenrek
2020-12-07libthread: reduce stack usage of threadkill*(), open /proc/n/ctl with OCEXEC ↵cinap_lenrek
flag
2020-12-07libthread: reduce stack usage for ioprocs, open /proc/n/ctl with OCEXEC flagcinap_lenrek
2020-12-07libthread: simplify threadsetname()cinap_lenrek
- open /proc/n/args with OCEXEC flag - reduce stack usage by using smaller buffer for path - format pid as ulong
2019-05-03libthread: initial support for arm64cinap_lenrek
2016-05-04retire the dec alpha portcinap_lenrek
2015-09-06libthread: get rid of tprivalloc()/tprivfree()/tprivdata() and _workerdata() ↵cinap_lenrek
(thanks qrstuv) these functions where undocumented and unused. especially tprivfree() was buggy missing a unlock() call. theres not much point in supporting these functions as theres threaddata() and procdata().
2015-08-25fix fuckupglenda
2015-08-25import E script from bell labsmischief
2015-08-10libthread: use "interrupt" proc ctl message instead of posting a note for ↵cinap_lenrek
threadint() threadint() is called to interrupt channel operation or a system call. the kernel provides a new "interrupt" procctl message to interrupt a process commited to or being in a blocking syscall, which is similar, but not the same. the main difference is that "interrupt" condition is not cleared before the process actually attempts to block. also can be cleared with "nointerrupt" ctl message. see proc(3)
2015-08-10libthread: fix mistake, make "all" the default target againcinap_lenrek
2015-08-08fix library mkfiles for objtype=spimcinap_lenrek
2015-03-04libthread: get rid of chaninit() (thanks qrstuv)cinap_lenrek
chaninit() does not initialize Chan.qentry and Chan.nentry and there is no way to get rid of such a channel. nobody is using it, so removing the function to avoid confusion.
2015-02-28libthread: remove unused internal functions and old xinc assembler filescinap_lenrek
2015-02-28libthread: use devdup instead of mounting pipe to /mnt/temp for ↵cinap_lenrek
close-on-exec in procexec() the namespace might be shared by other processes. instead, we create a anonymous pipe with pipe() and use devdup to open one end close-on-exec. this is shorter and avoids the race condition. do not touch Execargs after writing the error message as the process might be gone after the write. this was to manually close the fd which isnt neccesary as the kernel will do it for us on the following exit.
2013-12-06libthread: avoid calling thread waiting for fork/execed process to finish if ↵cinap_lenrek
we dont have to we do not need to wait for fork/execed program to finish when not collecting waitmsg. this reduces the number of rio processes hanging arround for each window shell just waiting for it to terminate and then dumping the waitmsg.
2012-04-03libthread: make ioproc even when opening /proc/n/ctl fails (factotum)cinap_lenrek
2012-01-10libc: restoring simple sequential version of dial()cinap_lenrek
2011-10-02libdraw: shutdown keyboard and mouseprocs with threadint, libthread: avoid ↵glenda
delayed note leak (this fixes the "too many delayed notes" error with auth/fgui)
2011-08-22libthread: reimplemented i/o procs using new interrupt ctl messagecinap_lenrek
2011-08-22libthread: remove auto-generated acid filescinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen