Commit graph

55 commits

Author SHA1 Message Date
Russ Cox
4197af4122 libthread: comment stack border a bit more 2020-01-24 13:09:55 -05:00
Russ Cox
8c573cab68 libthread: use mmap to allocate OpenBSD stacks
Should fix faults on OpenBSD.

Fixes #218.
Fixes #226.
2020-01-14 13:58:47 -05:00
Russ Cox
481b596d93 libthread: fix fault in teardown of proc
Fixes #332.
2020-01-13 23:26:42 -05:00
Russ Cox
0158bceec7 libthread: run first thread in proc on system stack
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.
2020-01-12 15:08:28 -05:00
Dan Cross
fa325e9b42 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>
2020-01-10 14:54:30 +00:00
Russ Cox
04e0a9bb81 libthread: Lion context routines 2011-10-13 23:57:54 -04:00
Russ Cox
fc567f476a build: OS X 64-bit build
R=rsc
http://codereview.appspot.com/4838047
2011-08-02 14:28:04 -04:00
Russ Cox
0829f75bba libthread: make page work on OS X 2009-08-17 17:29:44 -07:00
Russ Cox
0ac670585c libthread: work around gcc warning on FreeBSD 2008-12-23 13:03:07 -08:00
Russ Cox
d19769ae98 libthread: correct sysfatal handler prototype 2008-10-26 17:01:59 -04:00
Tim Wiess
69d1259cf9 libthread: add proper sysfatal 2008-07-20 03:11:05 -04:00
Russ Cox
faf1fb6c7e libthread: abort on single-threaded lock contention 2008-07-09 11:41:14 -04:00
Russ Cox
df1ee4e1af libthread: fix 64-bit bug in threadstart (Nathaniel Filardo) 2008-06-01 08:41:51 -04:00
Russ Cox
b32d9d9c2e libthread: remove bogus write in threadmain 2008-02-28 08:49:34 -05:00
rsc
df970459f9 pin 2006-06-26 05:47:59 +00:00
rsc
d93cc14ece fix proc leak; add p9usepwlibrary 2006-06-12 17:20:42 +00:00
rsc
af6e459f18 put threadinfo back 2006-04-21 03:58:52 +00:00
rsc
110c707dda darwin 386 start 2006-04-21 03:34:44 +00:00
rsc
cbeb0b26e4 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
rsc
615e0f9fb2 add threadidle 2006-02-07 17:02:05 +00:00
rsc
9eda38e51f add threadid 2006-02-05 17:50:09 +00:00
rsc
6dde87f83c Print information on SIGQUIT, SIGINFO. 2005-09-26 12:05:26 +00:00
rsc
5b0927915f Log if _threaddebuglevel is set. 2005-09-26 11:37:49 +00:00
rsc
d08f40666b sun 2005-07-27 13:06:50 +00:00
rsc
2b6040818e use full prototypes 2005-05-07 22:42:14 +00:00
rsc
0ba4eb47d4 no need to setproc(0) 2005-03-18 19:05:50 +00:00
rsc
8dd8a81f71 add threaddata 2005-03-18 18:56:17 +00:00
rsc
d7688cce37 add check for procscheduler returning 2005-02-16 17:15:56 +00:00
rsc
80b8842f3e hard-to-find locking bug 2005-02-15 18:08:28 +00:00
rsc
8ee6ad4d96 different fix for main proc bug 2005-02-14 18:58:56 +00:00
rsc
8f4871fd2e work around stupid linux bug 2005-02-13 18:35:19 +00:00
rsc
1fdb4a5450 rename scheduler to have a more distinctive name, so stack traces can end there 2005-01-23 22:57:53 +00:00
rsc
a0e8d02d09 Apparently SuSE 9.1's X distribution uses even bigger
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.
2005-01-23 16:02:04 +00:00
rsc
803292c631 proccreate race 2005-01-18 20:53:12 +00:00
rsc
515b6e5bff add threadgetname 2005-01-18 20:17:12 +00:00
rsc
8650250482 64-bit nonsense 2005-01-18 05:57:35 +00:00
rsc
0b561695d6 useful warning comment 2005-01-16 21:31:21 +00:00
rsc
2b3b1e8984 oops sunos 2005-01-14 18:11:21 +00:00
rsc
c8b6342d3c Many small edits. 2005-01-13 04:49:19 +00:00
rsc
37cc72d323 paranoia 2005-01-11 21:28:00 +00:00
rsc
b8f742db85 os x changes 2005-01-11 17:43:53 +00:00
rsc
1aa9c533e0 allow lock passing 2005-01-07 20:52:07 +00:00
rsc
a0a331aad9 add _procwakeupandunlock
to help ease locking contention
on Linux 2.4.
2005-01-06 23:43:42 +00:00
rsc
af89fc108d more debugging 2005-01-06 23:07:19 +00:00
rsc
15cd8255b5 more debugging 2005-01-04 22:22:18 +00:00
rsc
1d2533d010 restore old plan 9 property that when the
last thread exits the main proc, the remaining
program ends up in the background and the
program appears to have exited.
2004-12-28 22:36:24 +00:00
rsc
d54ead7fb9 more freebsd work 2004-12-28 04:20:39 +00:00
rsc
2c87dda8f8 add threaddaemonize(), more bug fixes 2004-12-28 01:35:38 +00:00
rsc
8cbd854a8a better exec handling 2004-12-27 19:11:33 +00:00
rsc
955a2ca78d starting to work on Linux 2004-12-27 18:21:58 +00:00