summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/arch/i386/i386
Commit message (Collapse)AuthorAgeFilesLines
* Clean out the leftovers from the i386_set_gsbase() TLS conversion.peter2005-06-291-39/+7
| | | | | | | | Like on libthr, there is an i386_set_gsbase() stub implementation here to avoid libc.so.5 issues. This should likely be a weak symbol and I expect this will be fixed soon. Approved by: re
* Remove the special _amd64_set_gsbase() code for #ifdef COMPAT_32BIT, nowpeter2005-04-261-6/+0
| | | | | that the amd64 kernel implements i386_get/set_gsbase(). All the rest of the ldt backwards compat code should go away soon.
* Use the i386_set_gsbase() syscall if it is implemented in the kernel.peter2005-04-141-14/+33
| | | | | This is a little hairy here because the allocation and usage of this functionality is split into two places in libpthread.
* i386_set_ldt() is not available when running 32 bit binaries on amd64peter2004-11-061-0/+6
| | | | | kernels. Use the recently exposed direct-set routines instead. This is only activated for when we compile i386 support libraries on amd64.
* Add TLS support for i386 and amd64.dfr2004-08-151-15/+15
|
* Eliminate two pushl by using call instruction directly, this reallydavidxu2003-11-291-2/+1
| | | | | | helps branch predict a lot for INTEL P4. Approved by: re (scottl)
* Fix FPU state restoring bug by jumping to right position.davidxu2003-09-221-2/+2
|
* Use auto LDT allocation for i386.deischen2003-08-051-63/+6
|
* Rethink the MD interfaces for libpthread to account fordeischen2003-08-052-59/+61
| | | | | | | | | archs that can (or are required to) have per-thread registers. Tested on i386, amd64; marcel is testing on ia64 and will have some follow-up commits. Reviewed by: davidxu
* This file hasn't been used for some time; nuke it.deischen2003-07-311-42/+0
|
* Take the same approach for i386 as that for ia64 and amd64. Usedeischen2003-07-313-211/+41
| | | | | | | | | the userland version of [gs]etcontext to switch between a thread and the UTS scheduler (and back again). This also fixes a bug in i386 _thr_setcontext() which wasn't properly restoring the context. Reviewed by: davidxu
* Untangle the inter-dependency of kse types and ksd types/functionsmarcel2003-06-231-0/+1
| | | | | | | | | | | | | | | | | | | by moving the definition of struct ksd to pthread_md.h and removing the inclusion of ksd.h from thr_private.h (which has the definition of struct kse and kse_critical_t). This allows ksd.h to have inline functions that use struct kse and kse_critical_t and generally yields a cleaner implementation at the cost of not having all ksd related types/definitions in one header. Implement the ksd functionality on ia64 by using inline functions and permanently remove ksd.c from the ia64 specific makefile. This change does not clean up the i386 specific version of ksd.h. NOTE: The ksd code on ia64 abuses the tp register in the same way as it is abused in libthr in that it is incompatible with the runtime specification. This will be address when support for TLS hits the tree.
* Eek, staticize a couple of functions that shouldn'tdeischen2003-05-191-1/+3
| | | | | | | | | | | | be external (initialize()!). Remove cancellation points from _pthread_cond_wait and _pthread_cond_timedwait (single underscore versions are libc private functions). Point the weak reference(!) for these functions to the versions with cancellation points. Approved by: re@(blanket till 5/19) Pointed out by: kan (cancellation point bug)
* Jump to the correct label upon detecting an error.deischen2003-04-291-2/+2
|
* o Don't add a scope system thread's KSE to the list of availabledeischen2003-04-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KSEs when it's thread exits; allow the GC handler to do that. o Make spinlock/spinlock critical regions. The following were submitted by davidxu o Alow thr_switch() to take a null mailbox argument. o Better protect cancellation checks. o Don't set KSE specific data when creating new KSEs; rely on the first upcall of the KSE to set it. o Add the ability to set the maximum concurrency level and do this automatically. We should have a way to enable/disable this with some sort of tunable because some applications may not want this to be the default. o Hold the scheduling lock across thread switch calls. o If scheduling of a thread fails, make sure to remove it from the list of active threads. o Better protect accesses to a joining threads when the target thread is exited and detached. o Remove some macro definitions that are now provided by <sys/kse.h>. o Don't leave the library in threaded mode if creation of the initial KSE fails. o Wakeup idle KSEs when there are threads ready to run. o Maintain the number of threads active in the priority queue.
* Use popfl to get the flags off the stack instead of popf.deischen2003-04-211-1/+1
| | | | Submitted by: davidxu
* Sorry folks; I accidentally committed a patch from what I was workingdeischen2003-04-182-5/+5
| | | | | | on a couple of days ago. This should be the most recent changes. Noticed by: davidxu
* Add architecture dependent atomic ops (atomic_swap only), KSE specificdeischen2003-04-184-10/+353
| | | | | | | data, and userland versions of [gs]etcontext(). Modify the UTS entry and exit functions to account of FPU validity and format.
* Directly load %edx from mailboxdavidxu2002-11-231-4/+3
|
* In _thread_enter_uts, fix eflags saving bug.davidxu2002-11-222-7/+15
| | | | | | | | In _thread_switch, set current thread pointer in kse mailbox only after all registers copied out of thread mailbox, kernel will do upcall at trap time, if set current thread pointer before loading all registers from thread mailbox, at trap time, the thread mailbox data will be overwritten by kernel, result is junk data is loaded into CPU.
* Adjust code for new mailbox format.davidxu2002-11-181-3/+3
| | | | Reviewed by: deischen, mini
* Use KSE to schedule threads.mini2002-10-302-0/+185
|
* Change #include "DEFS.h" to <machine/asm.h>.peter2001-10-251-1/+1
|
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-3/+0
|
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* Delete the atomic unlock function since it is no longer required.jb1998-06-091-15/+5
| | | | | Simplify the atomic lock to just write a value of 1 to the lock instead of taking the value passed by the caller (which just confused things).
* Atomic lock source.jb1998-04-291-0/+55
OpenPOWER on IntegriCloud