summaryrefslogtreecommitdiffstats
path: root/lib/libkse/arch/i386
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Make KSE_STACKSIZE machine dependent by moving it from thr_kern.c tomarcel2003-09-191-0/+2
| | | | | | pthread_md.h. This commit only moves the definition; it does not change it for any of the platforms. This more easily allows 64-bit architectures (in particular) to pick a slightly larger stack size.
* Don't assume sizeof(long) = sizeof(int) on x86; use intdeischen2003-09-031-6/+6
| | | | | | | | | | | | instead of long types for low-level locks. Add prototypes for some internal libc functions that are wrapped by the library as cancellation points. Add memory barriers to alpha atomic swap functions (submitted by davidxu). Requested by: bde
* Use auto LDT allocation for i386.deischen2003-08-051-63/+6
|
* Rethink the MD interfaces for libpthread to account fordeischen2003-08-054-21/+358
| | | | | | | | | 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
* Take the same approach for i386 as that for ia64 and amd64. Usedeischen2003-07-314-113/+75
| | | | | | | | | 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/+12
| | | | | | | | | | | | | | | | | | | 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.
* Move the machine specific files from sys/Makefile.inc and put themmarcel2003-06-231-0/+5
| | | | | in a machine specific makefile. While here, sort the sub-directories in Makefile and remove _atomic_lock.S from all makefiles.
* Move the mailbox to the beginning of the thread and align thedeischen2003-04-301-0/+3
| | | | thread so that the context (SSE FPU state) is also aligned.
* Sorry folks; I accidentally committed a patch from what I was workingdeischen2003-04-183-8/+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-2/+268
| | | | | | | data, and userland versions of [gs]etcontext(). Modify the UTS entry and exit functions to account of FPU validity and format.
* In _thread_enter_uts, fix eflags saving bug.davidxu2002-11-221-1/+2
| | | | | | | | 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-301-0/+96
OpenPOWER on IntegriCloud