summaryrefslogtreecommitdiffstats
path: root/lib/libthr/arch
Commit message (Collapse)AuthorAgeFilesLines
* Merge r195129 from project/mips to head by hand:imp2010-01-091-2/+6
| | | | | r195129 | gonzo | 2009-06-27 17:28:56 -0600 (Sat, 27 Jun 2009) | 2 lines - Use sysarch(2) in MIPS version of _tcb_set/_tcb_get
* Implement _umtx_op_err() for ia64.marcel2009-10-243-1/+38
|
* Commit missing mips libthr support that I thought I'd committed earlierimp2008-05-112-0/+141
|
* Bring in mips threads support from perforce mips2-jnpr branch.imp2008-04-261-0/+5
|
* Replace function _umtx_op with _umtx_op_err, the later function directlydavidxu2008-04-026-2/+81
| | | | | | returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library.
* style.Makefile(5)obrien2008-02-136-6/+6
|
* style(9)obrien2008-02-132-6/+6
|
* - Remove variable _thr_scope_system, all threads are system scope.davidxu2006-12-156-1/+11
| | | | | - Rename _thr_smp_cpus to boolean variable _thr_is_smp. - Define CPU_SPINWAIT macro for each arch, only X86 supports it.
* Stylize: avoid using a global register variable.marcel2006-09-012-6/+8
|
* Rename TLS_TP_OFFSET back to TP_OFFSET. The former clashes with rtld.marcel2006-09-011-3/+3
|
* Stylize.marcel2006-09-012-17/+11
|
* Stylize.marcel2006-08-311-6/+2
|
* TLS fixes:marcel2006-08-312-4/+8
| | | | | | | o The TLS pointer (r2) points 0x7000 after the *end* of the TCB. o _rtld_allocate_tls() gets a pointer to the current TCB, not the current TLS pointer. o _rtld_free_tls() gets the size of the TCB structure.
* Fix harmless bug: sizeof(tcb) equals sizeof(void*) not sizeof(struct tcb).marcel2006-08-311-1/+1
| | | | The argument is (currently) not used by _rtld_free_tls().
* o Set TP using inline assembly to avoid dead code elimination.marcel2006-08-301-5/+3
| | | | o Eliminate _tcb.
* Remove alpha left-overs.ru2006-08-223-133/+0
|
* Remove declaration of _thr_initial from MD header file, it is no longerdavidxu2006-04-042-4/+0
| | | | needed.
* Simplify _get_curthread() and _tcb_ctor because libc and rtld nowdavidxu2006-04-044-15/+6
| | | | | already allocate thread pointer space in tls block for initial thread. Only i386 and amd64 have been done, others still have to be tested.
* Remove functions i386_get_gsbase and i386_set_gsbase, they were alreadydavidxu2006-01-071-14/+0
| | | | in libc.
* Remove unused variable.davidxu2005-10-292-9/+0
| | | | Reviewed by: cognet
* Kill unused variable declaration.davidxu2005-10-291-2/+0
|
* Remove COMPAT_32BIT, it is no longer needed.davidxu2005-04-271-5/+0
|
* Remove unused variable.davidxu2005-04-231-1/+0
|
* Now libthr only uses GDT based tls on i386. using LDT can only increasedavidxu2005-04-232-53/+3
| | | | clock cycles and has 8191 threads limitation.
* Add i386_get_gsbase, i386_set_gsbase since old libc doesn't have thedavidxu2005-04-231-0/+14
| | | | functions, otherwise user ports have to be rebuilt.
* Adapt the libpthread patch for using i386_set_gsbase() to libthr.peter2005-04-142-16/+41
|
* Use the new atomic_cmpset_32().cognet2005-04-072-20/+0
|
* Import my recent 1:1 threading working. some features improved includes:davidxu2005-04-0224-354/+941
| | | | | | | | | | | | | | | | 1. fast simple type mutex. 2. __thread tls works. 3. asynchronous cancellation works ( using signal ). 4. thread synchronization is fully based on umtx, mainly, condition variable and other synchronization objects were rewritten by using umtx directly. those objects can be shared between processes via shared memory, it has to change ABI which does not happen yet. 5. default stack size is increased to 1M on 32 bits platform, 2M for 64 bits platform. As the result, some mysql super-smack benchmarks show performance is improved massivly. Okayed by: jeff, mtm, rwatson, scottl
* Fix inverted #ifdef that I added. Who had the pointy hat last?peter2004-12-061-1/+1
| | | | Submitted by: kan
* Use the recently exposed fs/gs set functions when compiling libthr topeter2004-11-061-0/+12
| | | | | | | run as a 32 bit support library for an amd64 kernel. 32 bit consumers of libthr have zero chance of running on an amd64 kernel since we don't implement the i386_set_ldt() family of functions. Note that this commit doesn't make it actually work, it just removes one more obstacle.
* Adjust code to support AMD64, on AMD64, thread needs to set fsbase bydavidxu2004-08-191-3/+10
| | | | | itself before it can execute any other code, so new thread should be created with all signals are masked until after fsbase is set.
* Add AMD64 support code.davidxu2004-08-192-0/+106
|
* Add TLS support for libthr on i386.dfr2004-08-152-74/+29
|
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-051-1/+1
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* libthr powerpc support.grehan2004-03-022-0/+63
| | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Tested with: most libpthread tests, Apache 'worker' MDM
* Bump up the maximum number concurrent threads on x86.mtm2004-02-011-1/+1
|
* Use dynamic instead of static LDT allocation.mtm2003-12-021-5/+4
| | | | Approved by: re (scottl)
* Implement _get_curthread and _set_curthread. We use GCCs builtinmarcel2003-07-241-1/+6
| | | | | function this, which expands to PAL calls (rduniq and wruniq). This needs adjustment when TLS is implemented.
* This commit was generated by cvs2svn to compensate for changes in r117783,mtm2003-07-192-0/+55
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * The MD framework for libthr on alphamtm2003-07-192-0/+55
|
* The move to _retire() a thread in the GC instead of in the thread'smtm2003-06-291-4/+2
| | | | | | | exit function has invalidated the need for _spin[un]lock_pthread(). The _spin[un]lock() functions can now dereference curthread without the danger that the ldtentry containing the pointer to the thread has been cleared out from under them.
* .S comments must be C comments, not ASM ones.obrien2003-06-021-1/+1
|
* Missing unlock.mtm2003-05-291-0/+2
| | | | Approved by: re/jhb
* Return gracefully, rather than aborting, when the maximum concurrentmtm2003-05-253-7/+12
| | | | | | threads per process has been reached. Return EAGAIN, as per spec. Approved by: re/blanket libthr
* The struct mcontext has changed. It's using the register sets. Bringmarcel2003-05-251-1/+1
| | | | this in line.
* Add two functions: _spinlock_pthread() and _spinunlock_pthread()mtm2003-05-231-2/+4
| | | | | | | | | | that take the address of a struct pthread as their first argument. _spin[un]lock() just become wrappers arround these two functions. These new functions are for use in situations where curthread can't be used. One example is _thread_retire(), where we invalidate the array index curthread uses to get its pointer.. Approved by: re/blanket libthr
* Make WARNS2 clean. The fixes mostly included:mtm2003-05-231-0/+5
| | | | | | | | o removed unused variables o explicit inclusion of header files o prototypes for externally defined functions Approved by: re/blanket libthr
* o Make the defenition of _set_curthread() match its declarationmtm2003-05-211-5/+27
| | | | | | | | | | | | in thr_private.h o Lock down the ldt_entries array and ldt_free, which points to the next free slot. As noted in the comments, it's necessary to special case the initial_thread because %gs is not setup for it yet. This is ok because that early in the program there won't be any reentrancy issues anyways. Approved by: re/blanket libthr
* Fix a null dereference leading to a core dump whenmtm2003-05-061-1/+4
| | | | | | | | the number of threads exceeds the number of open slots in ldt_entries[]. Approved by: markm (mentor)(implicit) Reviewed by: jeff
* Add support for ia64.marcel2003-04-202-0/+64
| | | | | | | | | | | Note that the tp register (r13) is reserved as the TLS pointer in the same way that that gp register (r1) is reserved as the global pointer. This implementation uses the tp register to point to the thread structure used by the threads implementation. This is not in violation with the runtime specification provided the TLS is a fixed distance from the thread structure. This is only an issue when code used the __thread keyword to create TLS. This is not supported at the moment.
OpenPOWER on IntegriCloud