HomeFreeBSD

libthr: switch thread and sleepq memory allocator to crt from libc malloc

Description

libthr: switch thread and sleepq memory allocator to crt from libc malloc

There are more complex interactions between malloc and libthr
initialization that can happen if libthr functions are called from ELF
object' constructors, before libthr is initialized. Break the
dependencies loop by using the private allocator with controlled init.

Reported by: yuri
Reviewed by: markj, olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48454

Details

Provenance
kibAuthored on Tue, Jan 14, 9:06 AM
Reviewer
markj
Differential Revision
D48454: Fix libthr initialization from constructors
Parents
rG9718f18471f7: pthread_mutex_trylock(): init libthr if needed
Branches
Unknown
Tags
Unknown