summaryrefslogtreecommitdiff
path: root/lib/libpthread/arch
Commit message (Collapse)AuthorAgeFilesLines
* Repo copy libpthreads to libkse.David E. O'Brien2007-10-0937-3968/+0
| | | | | | | | | This introduces the WITHOUT_LIBKSE nob, and changes WITHOUT_LIBPTHREADS to mean with neither threading libs. Approved by: re(kensmith) Notes: svn path=/head/; revision=172492
* Stylize:Marcel Moolenaar2006-09-012-35/+51
| | | | | | | | | | o avoid using a global register variable. o redefine struct ia64_tp as a union. We don't have to get to the fields themselves. We just need it to be of the right size with the right alignment. Notes: svn path=/head/; revision=161841
* The ucontext is 16-byte aligned, which means that struct tcb isMarcel Moolenaar2006-09-011-0/+1
| | | | | | | | | | 16-byte aligned. Consequently, struct tcb is a multiple of 16 bytes in size. We need to make sure there's no padding after struct ppc32_tp. We do this by explicitly adding the necessary padding in front of it. Notes: svn path=/head/; revision=161830
* Stylize. Introduce ppc_{get|set}_tp() and ppc_{get|set}_tcb() toMarcel Moolenaar2006-09-012-29/+59
| | | | | | | abstract the magic that happens when deriving one or the other. Notes: svn path=/head/; revision=161828
* Implement TLS.Marcel Moolenaar2006-09-014-50/+61
| | | | Notes: svn path=/head/; revision=161802
* Remove alpha left-overs.Ruslan Ermilov2006-08-226-798/+0
| | | | Notes: svn path=/head/; revision=161526
* In order to let new binutils can compile it, replace movl withDavid Xu2006-05-071-9/+9
| | | | | | | | | movw for segment saving and restoring. Submitted by: Diego 'Flameeyes' Petteno flameeyes at gentoo dot org Notes: svn path=/head/; revision=158348
* Fix a race condition introduced when redzones were added. Use anDaniel Eischen2006-02-241-5/+4
| | | | | | | | | atomic operation to return and adjust the stack. Submitted by: luoqi Notes: svn path=/head/; revision=155990
* Remove an unused variable.Daniel Eischen2005-07-291-1/+0
| | | | Notes: svn path=/head/; revision=148544
* Clean out the leftovers from the i386_set_gsbase() TLS conversion.Peter Wemm2005-06-292-51/+8
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=147673
* Add a missing END() to quiet a warning.John Baldwin2005-05-311-0/+1
| | | | Notes: svn path=/head/; revision=146832
* Remove the special _amd64_set_gsbase() code for #ifdef COMPAT_32BIT, nowPeter Wemm2005-04-262-10/+0
| | | | | | | | that the amd64 kernel implements i386_get/set_gsbase(). All the rest of the ldt backwards compat code should go away soon. Notes: svn path=/head/; revision=145569
* Use the i386_set_gsbase() syscall if it is implemented in the kernel.Peter Wemm2005-04-142-16/+41
| | | | | | | | This is a little hairy here because the allocation and usage of this functionality is split into two places in libpthread. Notes: svn path=/head/; revision=145039
* Use the new atomic_cmpset_32().Olivier Houchard2005-04-071-15/+0
| | | | Notes: svn path=/head/; revision=144765
* Bring in a more healthy version of the libpthread for arm, which usesOlivier Houchard2005-02-264-4/+12
| | | | | | | ARM_TP_ADDRESS. Notes: svn path=/head/; revision=142571
* i386_set_ldt() is not available when running 32 bit binaries on amd64Peter Wemm2004-11-062-0/+13
| | | | | | | | kernels. Use the recently exposed direct-set routines instead. This is only activated for when we compile i386 support libraries on amd64. Notes: svn path=/head/; revision=137295
* Cosmetic tweaks to reduce diffs to the i386 counterpart.Peter Wemm2004-11-061-2/+3
| | | | Notes: svn path=/head/; revision=137294
* Partial support of KSE for arm.Olivier Houchard2004-11-054-59/+66
| | | | Notes: svn path=/head/; revision=137283
* _tcb_ctor takes two args.Olivier Houchard2004-09-242-2/+2
| | | | Notes: svn path=/head/; revision=135735
* Add missing brackets. It was committed from wrong tree.David Xu2004-08-261-1/+1
| | | | Notes: svn path=/head/; revision=134326
* gcc -O2 cleanup. tested for a long time.David Xu2004-08-252-4/+4
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=134319
* Fix compile, s/tp_dtv/tp_tdv/g.David Xu2004-08-164-4/+4
| | | | Notes: svn path=/head/; revision=133857
* Bring PPC up to date with latest TLS changes.Peter Grehan2004-08-162-3/+3
| | | | Notes: svn path=/head/; revision=133806
* 1. Add macro DTV_OFFSET to calculate dtv offset in tcb.David Xu2004-08-167-0/+9
| | | | | | | 2. Export symbols needed by debugger. Notes: svn path=/head/; revision=133801
* Add TLS support for i386 and amd64.Doug Rabson2004-08-1510-33/+42
| | | | Notes: svn path=/head/; revision=133756
* Save context in kernel fashion, so it can be restored byDavid Xu2004-07-311-2/+5
| | | | | | | kse_switchin syscall. Notes: svn path=/head/; revision=132928
* Remove unused field.David Xu2004-07-311-1/+0
| | | | Notes: svn path=/head/; revision=132927
* Macro optimize, this increases context switch speed about 2% on myDavid Xu2004-07-311-2/+2
| | | | | | | athlon64 machine. Notes: svn path=/head/; revision=132913
* PPC MD bits for KSE. Runs test cases OK. Crippled to 1:1 mode forPeter Grehan2004-07-198-0/+820
| | | | | | | the time being. Notes: svn path=/head/; revision=132400
* Copy lwp id to thread mailbox.David Xu2004-07-141-0/+1
| | | | Notes: svn path=/head/; revision=132128
* Call kse_switchin to switch context when being debugged.David Xu2004-07-135-31/+89
| | | | Notes: svn path=/head/; revision=132125
* kse_switchin ABI was changed in kernel.David Xu2004-07-121-3/+2
| | | | Notes: svn path=/head/; revision=132021
* Avoid clobbering the red zone when running on the new context's stack inTim J. Robbins2004-06-071-0/+5
| | | | | | | _amd64_restore_context(). Notes: svn path=/head/; revision=130206
* Arm bits for libpthread. It has no chances to work and should be consideredOlivier Houchard2004-05-145-0/+471
| | | | | | | as stubs. Notes: svn path=/head/; revision=129206
* style cleanup: Remove duplicate $FreeBSD$ tags.Colin Percival2004-02-101-2/+0
| | | | | | | | | | | These files had tags after teh copyright notice, inside the comment block (incorrect, removed), and outside the comment block (correct). Approved by: rwatson (mentor) Notes: svn path=/head/; revision=125669
* Simplify the contexts created by the kernel and remove the relatedMarcel Moolenaar2003-12-071-0/+6
| | | | | | | | | | | | flags. We now create asynchronous contexts or syscall contexts only. Syscall contexts differ from the minimal ABI dictated contexts by having the scratch registers saved and restored because that's where we keep the syscall arguments and syscall return values. Since this change affects KSE, have it use kse_switchin(2) for the "new" syscall context. Notes: svn path=/head/; revision=123255
* Apply a second fix for stack alignment with libkse. This time, enter thePeter Wemm2003-12-051-2/+2
| | | | | | | | | | | | | | UTS with the stack correctly aligned. Also, while here, use an indirect jump rather than the pushq/ret hack. This fixes threaded apps that use floating point for me, although it hasn't solved all the problems. It is an improvement though. Preservation of the 128 byte red zone hasn't been resolved yet. Approved by: re (scottl) Notes: svn path=/head/; revision=123155
* Eliminate two pushl by using call instruction directly, this reallyDavid Xu2003-11-291-2/+1
| | | | | | | | | helps branch predict a lot for INTEL P4. Approved by: re (scottl) Notes: svn path=/head/; revision=123049
* Use amd64_set_fsbase() instead of calling sysarch() directly.Peter Wemm2003-10-231-6/+1
| | | | Notes: svn path=/head/; revision=121409
* Update context code for my last ABI breakage of mcontext. I'm worriedPeter Wemm2003-10-171-7/+8
| | | | | | | | | | about the fpu code here. It should be using fxsave/fxrstor instead of saving/restoring the control word. The SSE registers are used a lot in gcc generated code on amd64. I'm not sure how this all fits together though. Notes: svn path=/head/; revision=121163
* Don't forget to initialize the fake tcb when the kcb is allocated.Daniel Eischen2003-10-121-0/+3
| | | | Notes: svn path=/head/; revision=121043
* Reverse the order of the first two arguments to _sparc64_enter_uts().Daniel Eischen2003-10-091-2/+2
| | | | | | | | The first argument is the UTS function, the second argument is the first argument to the UTS function. Who's on first. Notes: svn path=/head/; revision=120956
* Convert a couple of hardcoded values to constants. Make thr_getcontext()Daniel Eischen2003-10-092-3/+7
| | | | | | | | return 0 when called the first time, and return 1 when resumed by thr_setcontext(). Notes: svn path=/head/; revision=120939
* Add preliminary sparc64 support to libpthread. This does notDaniel Eischen2003-10-096-0/+509
| | | | | | | | | | | yet work, but hopefully someone familiar with the sparc64 port can pick up the reins. Submitted by: jake With mods by: deischen Notes: svn path=/head/; revision=120924
* Fix a logic error; use beq to check for a register being NULL, not bne.Daniel Eischen2003-10-021-1/+1
| | | | Notes: svn path=/head/; revision=120675
* Add __volatile keyword.David Xu2003-09-261-2/+4
| | | | Notes: svn path=/head/; revision=120469
* s/ia64/alpha/gMarcel Moolenaar2003-09-261-5/+4
| | | | Notes: svn path=/head/; revision=120454
* Fix FPU state restoring bug by jumping to right position.David Xu2003-09-221-2/+2
| | | | Notes: svn path=/head/; revision=120337
* Make KSE_STACKSIZE machine dependent by moving it from thr_kern.c toMarcel Moolenaar2003-09-194-1/+8
| | | | | | | | | 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. Notes: svn path=/head/; revision=120263
* _ia64_break_setcontext() now takes a mcontext_t. While here, defineMarcel Moolenaar2003-09-191-10/+3
| | | | | | | | | | | | | | | THR_SETCONTEXT as PANIC(). The THR_SETCONTEXT macro is currently not used, which means that the definition we had could be wrong, overly pessimistic or unknowingly right. I don't like the odds... The new _ia64_break_setcontext() and corresponding kernel fixes make KSE mostly usable. There's still a case where we don't properly restore a context and end up with a NaT consumption fault (typically an indication for not handling NaT collection points correctly), but at least now mutex_d works... Notes: svn path=/head/; revision=120254