freebsd-dev/lib/libthr
Konstantin Belousov e4314da2e4 Fixes for very early use of the pthread_mutex_* and libthr malloc.
When libthr is statically linked into the binary, order of the
constructors execution is not deterministic.  It is possible for the
application constructor to use pthread_mutex_* functions before the
libthr initialization was done.

Handle it by:
- making thr_malloc.c locking functions operational when curthread is not
  yet set;
- making __thr_malloc_init() idempotent, allowing more than one call to it;
- unconditionally calling __thr_malloc_init() before initializing
  a process-private mutex.

Reported and tested by:	mmel
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-02-04 21:16:15 +00:00
..
arch lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
sys spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
tests Use MACHINE_CPUARCH in preference MACHINE for userland. 2017-11-07 09:57:26 +00:00
thread Fixes for very early use of the pthread_mutex_* and libthr malloc. 2019-02-04 21:16:15 +00:00
libthr.3 Fix markup. 2016-06-04 20:20:14 +00:00
Makefile Rename rtld-elf/malloc.c to rtld-elf/rtld_malloc.c. 2019-01-30 16:28:27 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
plockstat.d Add the DTrace probe definitions for plockstat support. 2014-07-05 19:49:31 +00:00
pthread.map Add pthread_get_name_np(3). 2018-08-17 18:34:07 +00:00