Commit Graph

27 Commits

Author SHA1 Message Date
ad
de2138164c Remove the PTHREAD_SA option. If M:N threads is reimplemented it's
better off done with a seperate library.
2007-03-02 18:53:51 +00:00
christos
d1ddfe10b1 fix warning about indirect call without * 2007-01-20 18:56:30 +00:00
cube
562d0d89a2 Instead of using hard-coded values for various registers, get them from the
current context.  Valid values can change depending on how the kernel is
setup.  i386 and amd64 happen to be setup differently.
2006-03-29 22:55:15 +00:00
skrll
73b7bdcee7 A couple of fixes to make libpthread really shared, i.e. not have text re-
locations:

	- Don't declare pthread__switch_away global
	- Do the PIC dance for pthread__switch_return_point and
	  pthread__locked_switch. Ideally these (and other) symbols would
	  be hidden.

Thanks to uwe@, dyoung@ and elad@ for help.

XXX sh3 is still to be done.
XXX vax does strange things.
2006-01-04 12:43:43 +00:00
perry
4e11af46bc Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 21:11:15 +00:00
nathanw
45204d9ceb Punt to setcontext() system call if the PSL_T bit (single-step trap)
is set, so that the single-step trap happens in the thread's context
and not in the middle of _setcontext_u.

XXX might be able to do something here with iret, too, but it needs
more testing.
2004-11-30 21:05:01 +00:00
kent
63a8cde231 save&restore %fs and %gs registers for USER_LDT applications.
PR#26900
2004-11-10 01:12:57 +00:00
simonb
9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
nathanw
94fc83a6be Add ucontext conversion macros for an "extra" register set. 2004-02-11 21:04:10 +00:00
yamt
71b290e975 use explicit "l" suffixes. (eg. lea -> leal) 2003-10-30 13:56:37 +00:00
cl
89d0cfd21f Remove possible race condition in upcall recycling. 2003-09-07 14:47:44 +00:00
nathanw
d37a996a49 Adapt to structure name changes. 2003-07-17 20:55:25 +00:00
nathanw
9639eeaf54 Adapt to pt_trapuc: change STACK_SWITCH to check for a value in pt_trapuc
and use it preferentially to a value in pt_uc, clearing it once on the new
stack. Move stores into pt_uc back to before the stack switch; storing
after the stack switch opened a one-instruction race condition where an upcall
that had just started a chain could be preempted again, and would bomb when
restarted due to its pt_uc not yet having been updated. Now that pt_trapuc
is what the upcall code writes to, it is safe to store to pt_uc before
switching stacks.

Remove obsolete pt_sleepuc code.
2003-06-26 01:45:31 +00:00
nathanw
1414a095ac Remove PT_SLEEPUC and add PT_TRAPUC. 2003-06-26 01:29:28 +00:00
nathanw
f866ba061d Two fixes:
* In switch-away cases, write PT_SWITCHTO last (after PT_SWITCHTOUC), so
   that pthread__resolve_locks() doesn't see an empty SWITCHTOUC value. This
   also permits pthread__resolve_locks() to use the presence of PT_SWITCHTO
   as a sign that the thread has done all of its necessary chain work.

 * Make the return-point of pthread__switch global and visible, so that its
   address can be compared to the PC of a thread, again as a sign that its
   chain-work is done.

(other architectures in progress, after they get the *previous* asm fix...)
2003-06-12 21:46:03 +00:00
lukem
f043c0fb57 add __RCSID() 2003-03-08 08:03:34 +00:00
fvdl
59f9830997 Continue at the plain switch return point in pthread__switch, not the
locked one, in the !PIC case. From Tor Egge via Havard Eidnes.
2003-02-10 11:09:33 +00:00
christos
54ba9fedfe delint 2003-01-18 19:11:07 +00:00
christos
9631ace572 de-lint 2003-01-18 18:40:52 +00:00
thorpej
c62a74e6d5 Merge the nathanw_sa branch. 2003-01-18 10:32:11 +00:00
scottr
a1d96607f3 This incarnation of the pthreads library is ancient and not useful, and
should have been mothballed some time ago...
1997-10-08 17:14:35 +00:00
proven
21f4b3b04c More wrapper functions, and some hacks for machine independent sleep
mechanisms.
1994-02-07 22:00:44 +00:00
mycroft
c48a79fee8 Stylistic change. 1994-01-27 06:50:06 +00:00
mycroft
abeb62670e Delete special rules for syscall.S; they are not needed, and one of them
is wrong anyway.
1994-01-07 16:36:45 +00:00
proven
abe1bf3801 Copyrights added to each file. 1993-12-20 19:30:07 +00:00
proven
e123d2840c OK one more try at getting it right ... 1993-11-15 10:02:18 +00:00
proven
89fc7bac08 Initial release of the POSIX 1003.4a Draft 7 thread implementation. 1993-11-14 22:06:22 +00:00