#
296373 |
|
04-Mar-2016 |
marius |
- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1 builds. - Update newvers.sh to reflect RC1. - Update __FreeBSD_version to reflect 10.3. - Update default pkg(8) configuration to use the quarterly branch.
Approved by: re (implicit) |
#
286853 |
|
17-Aug-2015 |
kib |
MFC r286582: Pre-resolve symbols required for the deferred signal processing.
|
#
267200 |
|
07-Jun-2014 |
kib |
MFC r266609: Change the _rtld_atfork() to lock the bind lock in write mode.
|
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
249425 |
|
12-Apr-2013 |
jilles |
libthr: Remove _thr_rtld_fini(), unused since r245630.
|
#
217191 |
|
09-Jan-2011 |
kib |
Implement the __pthread_map_stacks_exec() for libthr.
Stack creation code is changed to call _rtld_get_stack_prot() to get the stack protection right. There is a race where thread is created during dlopen() of dso that requires executable stacks. Then, _rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread is still not linked into the thread list. In this case, the callback misses the thread stack, and rechecks the required protection afterward.
Reviewed by: davidxu
|
#
212076 |
|
01-Sep-2010 |
davidxu |
Add signal handler wrapper, the reason to add it becauses there are some cases we want to improve: 1) if a thread signal got a signal while in cancellation point, it is possible the TDP_WAKEUP may be eaten by signal handler if the handler called some interruptibly system calls. 2) In signal handler, we want to disable cancellation. 3) When thread holding some low level locks, it is better to disable signal, those code need not to worry reentrancy, sigprocmask system call is avoided because it is a bit expensive. The signal handler wrapper works in this way: 1) libthr installs its signal handler if user code invokes sigaction to install its handler, the user handler is recorded in internal array. 2) when a signal is delivered, libthr's signal handler is invoke, libthr checks if thread holds some low level lock or is in critical region, if it is true, the signal is buffered, and all signals are masked, once the thread leaves critical region, correct signal mask is restored and buffered signal is processed. 3) before user signal handler is invoked, cancellation is temporarily disabled, after user signal handler is returned, cancellation state is restored, and pending cancellation is rescheduled.
|
#
211859 |
|
27-Aug-2010 |
davidxu |
clear lock to zero state if it is destroyed.
|
#
211833 |
|
26-Aug-2010 |
davidxu |
Decrease rdlock count only when thread unlocked a reader lock.
MFC after: 3 days
|
#
195403 |
|
06-Jul-2009 |
attilio |
In the current code, rdlock_count is not correctly handled for some cases. The most notable is that it is not bumped in rwlock_rdlock_common() when the hard path (__thr_rwlock_rdlock()) returns successfully. This can lead to deadlocks in libthr when rwlocks recursion in read mode happens. Fix the interested parts by correctly handling rdlock_count.
PR: threads/136345 Reported by: rink Tested by: rink Reviewed by: jeff Approved by: re (kib) MFC: 2 weeks
|
#
191291 |
|
19-Apr-2009 |
rwatson |
Now that the kernel defines CACHE_LINE_SIZE in machine/param.h, use that definition in the custom locking code for the run-time linker rather than local definitions.
Pointed out by: tinderbox MFC after: 2 weeks
|
#
185728 |
|
07-Dec-2008 |
peter |
When libthr and rtld start up, there are a number of magic spells cast in order to get the symbol binding state "just so". This is to allow locking to be activated and not run into recursion problems later.
However, one of the magic bits involves an explicit call to _umtx_op() to force symbol resolution. It does a wakeup operation on a fake, uninitialized (ie: random contents) umtx. Since libthr isn't active, this is harmless. Nothing can match the random wakeup.
However, valgrind finds this and is not amused. Normally I'd just write a suppression record for it, but the idea of passing random args to syscalls (on purpose) just doesn't feel right.
|
#
185558 |
|
02-Dec-2008 |
kib |
Provide custom simple allocator for rtld locks in libthr. The allocator does not use any external symbols, thus avoiding possible recursion into rtld to resolve symbols, when called.
Reviewed by: kan, davidxu Tested by: rink MFC after: 1 month
|
#
178413 |
|
22-Apr-2008 |
davidxu |
Use native rwlock.
|
#
177853 |
|
02-Apr-2008 |
davidxu |
Replace function _umtx_op with _umtx_op_err, the later function directly 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.
|
#
177470 |
|
21-Mar-2008 |
davidxu |
Resolve __error()'s PLT early so that it needs not to be resolved again, otherwise rwlock is recursivly called when signal happens and the __error was never resolved before.
|
#
177445 |
|
20-Mar-2008 |
davidxu |
Preserve application code's errno in rtld locking code, it attemps to keep any case safe.
|
#
173801 |
|
21-Nov-2007 |
davidxu |
Remove umtx_t definition, use type long directly, add wrapper function _thr_umtx_wait_uint() for umtx operation UMTX_OP_WAIT_UINT, use the function in semaphore operations, this fixed compiler warnings.
|
#
157457 |
|
04-Apr-2006 |
davidxu |
WARNS level 4 cleanup.
|
#
157113 |
|
25-Mar-2006 |
davidxu |
Only wake up writer if the lock is free.
|
#
157111 |
|
25-Mar-2006 |
davidxu |
Add locking support for rtld.
|