#
98247283 |
| 02-Nov-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
pthreads - Fix rtld-elf and libthread_xu
* Fixes chrome, thunderbird, and multiple other issues with recent libpthreads work.
Testing-by: mneumann, dillon
|
#
fcaa7a3a |
| 02-Nov-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
libthread_xu - Fix rtld and refactor locks
* Add a separate atfork facility for internal pthread atfork entities (sem and rtld) which must execute after all user atfork entities pre-fork and bef
libthread_xu - Fix rtld and refactor locks
* Add a separate atfork facility for internal pthread atfork entities (sem and rtld) which must execute after all user atfork entities pre-fork and before all user atfork entities post-fork.
* Install an atfork handler for rtld-elf (also requires rtld-elf to be updated). The handler will ensure that RTLD locks are in a sane state prior to fork (by acquiring them), and will then release the locks post-fork. This is the primary fix for lang/rust and cargo.
Also do not issue _thr_rtld_fini() when threading drops to 0. Once threading has been set, rtld's pthread locks remain installed.
* Refactor thr_cond.c. Refactor condition variables to perform according to the spec. Use a TAILQ to make pthread_cond_signal() work exactly as described in the manual (that is, waking up only one waiter at a time).
* Refactor thr_mutex.c. Primary instrument for debugging and clean up. Also deal with improper EINTR handling.
* Refactor thr_fork.c. Implement the new atfork facility for internal atfork handlers.
* Refactor thr_rwlock.c. Add debugging, cleanup.
* thr_sem.c now uses the internal atfork handler to ensure proper ordering.
* thr_sig.c implements debugging features.
* Refactor thr_umtx.c... the low level mutex code. Store the id for additonal verification and use an atomic lock to clear the lock instead of an assignment. Properly ignore EINTR.
* Cleanup init_private() a bit.
* Add PTHREADS_DEBUGGING=TRUE and PTHREADS_DEBUGGING2=TRUE make flags. The first writes out a garbage file in /tmp for all locking operations as they occur. The second is used for point debugging and writes out a file when signal 63 is sent to the program.
* Add cpu_ccfence() in various places that might need it (a hack for the moment, userland cannot currently #include "machine/cpufunc.h").
* Should fix lang/rust and 'cargo'
show more ...
|
#
16fb9086 |
| 02-Apr-2017 |
Imre Vadász <imre@vdsz.com> |
libc/libpthread: Inject threadsafe locking callbacks for rtld.
* Make rtld thread-safe. Add lib/libthread_xu/thread/thr_rtld.c to the build and use it to inject pthread based locking callbacks f
libc/libpthread: Inject threadsafe locking callbacks for rtld.
* Make rtld thread-safe. Add lib/libthread_xu/thread/thr_rtld.c to the build and use it to inject pthread based locking callbacks for rtld.
* In rtld_lock.c, do the thread_mask_clear(lock->mask); after releasing the actual lock, to avoid deadlocks when rtld is called recursively from the pthread locking callbacks. XXX An alternative solution for this issue would be, to flag the libpthread dynamic library as bind_now to avoid the recursive rtld calls.
show more ...
|
#
19451dc5 |
| 16-Sep-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
pthread: General pre-cleanup (style, typos etc)
No functional change.
|
#
d3b15642 |
| 16-Sep-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
pthread: Sync copyright changes with FreeBSD.
Taken-from: FreeBSD
|
#
9e2ee207 |
| 29-Mar-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Cleanup the TLS implementation: - Define the TCB layout in machine/tls.h, define wether tcb_self exists or not. - Define the layout of the DTV, not used yet. - Define the TLS variant - Define commo
Cleanup the TLS implementation: - Define the TCB layout in machine/tls.h, define wether tcb_self exists or not. - Define the layout of the DTV, not used yet. - Define the TLS variant - Define common access functions (tls_get_tcb, tls_get_curthread, tls_set_tcb) and the RTLD functions.
show more ...
|
#
71b3fa15 |
| 01-Feb-2005 |
David Xu <davidxu@dragonflybsd.org> |
Import initial version of 1:1 pthread library.
|