| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
- Rename _thr_smp_cpus to boolean variable _thr_is_smp.
- Define CPU_SPINWAIT macro for each arch, only X86 supports it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The argument is (currently) not used by _rtld_free_tls().
|
|
|
|
| |
o Eliminate _tcb.
|
| |
|
|
|
|
| |
needed.
|
|
|
|
|
| |
already allocate thread pointer space in tls block for initial thread.
Only i386 and amd64 have been done, others still have to be tested.
|
|
|
|
| |
in libc.
|
|
|
|
| |
Reviewed by: cognet
|
| |
|
| |
|
| |
|
|
|
|
| |
clock cycles and has 8191 threads limitation.
|
|
|
|
| |
functions, otherwise user ports have to be rebuilt.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Submitted by: kan
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
itself before it can execute any other code, so new thread should be
created with all signals are masked until after fsbase is set.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
Tested with: most libpthread tests, Apache 'worker' MDM
|
| |
|
|
|
|
| |
Approved by: re (scottl)
|
|
|
|
|
| |
function this, which expands to PAL calls (rduniq and wruniq).
This needs adjustment when TLS is implemented.
|
|\
| |
| |
| | |
which included commits to RCS files with non-trunk default branches.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Approved by: re/jhb
|
|
|
|
|
|
| |
threads per process has been reached. Return EAGAIN, as per spec.
Approved by: re/blanket libthr
|
|
|
|
| |
this in line.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
o removed unused variables
o explicit inclusion of header files
o prototypes for externally defined functions
Approved by: re/blanket libthr
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
the number of threads exceeds the number of open slots
in ldt_entries[].
Approved by: markm (mentor)(implicit)
Reviewed by: jeff
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|