Commit graph

67 commits

Author SHA1 Message Date
Russ Cox
41b3e8b989 libthread: use consistent stack calculation code in makecontext
Also reduce duplication: makecontext is per-arch not per-os-arch.

May fix #353.
2020-01-19 23:04:58 -05:00
Russ Cox
c181e39eea libthread: rm unused sparc-ucontext.h
More dead code.
2020-01-19 21:26:30 -05:00
Russ Cox
8dcb18f71b libthread: rm FreeBSD 4 code
Pretty sure FreeBSD 4 is gone now. :-)
2020-01-19 21:26:23 -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
9e4b56e764 libthread: add threadspawnd
R=rsc
http://codereview.appspot.com/6742064
2012-10-22 12:32:09 -04:00
Russ Cox
20f5692b7f openbsd updates (thanks Pascal Stumpf)
R=rsc
http://codereview.appspot.com/6401049
2012-07-14 10:16:54 -04:00
Russ Cox
813b3eea8b OS X PowerPC fixes (thanks Cameron Kaiser) 2011-10-23 17:55:23 -04: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
Richard Miller
9cf92718e9 arm: build fixes
Get p9p to build cleanly for ARM - based on suggestions from rsc and eekee, plus a final tweak from me.  Tested (a bit) on sheevaplug (ubuntu jaunty), Nokia N800 (maemo 4) and Nokia N900 (maemo 5).

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4524056
2011-05-18 13:20:56 -04:00
Russ Cox
ba940ae61c libthread: context switching for arm, still not complete 2009-11-18 04:12:17 -05:00
Russ Cox
fa662c9571 INSTALL: fix build on Snow Leopard
http://codereview.appspot.com/116073
2009-09-11 13:51:50 -04:00
Russ Cox
2640996af8 libthread: use our own swapcontext/makecontext even on OS X 10.5 2007-11-05 13:14:52 -05:00
Russ Cox
ea55a42c96 libthread: better OS X 10.5 test (Jeff Sickel) 2007-11-03 16:10:39 -04:00
Russ Cox
e7ae61181c libthread: Apple OS X 10.5 (Leopard) tweaks (Jeff Sickel, Bakul Shah) 2007-10-30 13:33:12 -04:00
Russ Cox
47ede89e4a libthread: simplify alt tracking, possibly fixing bug 2007-08-22 11:14:30 -04:00
rsc
528dba4d31 use standard sun context routines 2007-05-01 10:51:23 +00:00
rsc
ff63eeb1bd pin 2006-06-26 05:49:10 +00:00
rsc
17558fbe2d set RFNOTEG when we can 2006-06-04 16:06:49 +00:00
rsc
110c707dda darwin 386 start 2006-04-21 03:34:44 +00:00
rsc
615e0f9fb2 add threadidle 2006-02-07 17:02:05 +00:00
rsc
ac3d129813 const 2005-11-04 19:00:17 +00:00
rsc
a81eb4ca63 try again 2005-11-04 18:10:30 +00:00
rsc
33a102fc28 try arm again 2005-11-04 18:09:35 +00:00
rsc
1e05fdf92c use macro for getcontext (setjmp) 2005-11-04 16:34:19 +00:00
rsc
48ca8d21f7 FreeBSD changed! 2005-11-01 18:35:25 +00:00
rsc
b4b686415d openbsd 2005-07-20 23:29:56 +00:00
rsc
9d654ebc8c openbsd 2005-07-19 11:43:12 +00:00
rsc
cea10000c5 OpenBSD/power support. 2005-05-01 18:38:12 +00:00
rsc
8dd8a81f71 add threaddata 2005-03-18 18:56:17 +00:00
rsc
8ee6ad4d96 different fix for main proc bug 2005-02-14 18:58:56 +00:00
rsc
669a062b5a osprocid can be -1 2005-01-30 16:35:05 +00:00
rsc
7a2c88509b allow config to override kernel version 2005-01-17 21:30:05 +00:00
rsc
b8f742db85 os x changes 2005-01-11 17:43:53 +00:00
rsc
50f7ec339a initial darwin 2005-01-07 21:47:30 +00:00
rsc
a0a331aad9 add _procwakeupandunlock
to help ease locking contention
on Linux 2.4.
2005-01-06 23:43:42 +00:00
rsc
c7acb53e03 add _threaddaemonize 2005-01-04 22:23:24 +00:00
wkj
0debe1c681 Use FreeBSD-approved method for determining FreeBSD version. 2004-12-29 01:29:42 +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
rsc
e127e40bb1 shuffle to allow use of execchan in non-pthreads impls 2004-12-27 17:19:44 +00:00
rsc
4dbefdd41c start linux pre-2.6 port 2004-12-27 16:52:26 +00:00
rsc
73722a8bbf confine pthreads to pthread.c 2004-12-27 03:49:03 +00:00
rsc
e1dc7e4511 signal handling, add prototype for pthreadinit 2004-12-27 00:13:48 +00:00