summaryrefslogtreecommitdiffstats
path: root/lib/libc/thread/unithread_malloc_lock.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-071-76/+0
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-071-1/+19
| | | | | | | | | | unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
* remove _MALLOC_LOCK_INIT; major bump; ok deraadt@otto2008-06-131-9/+1
|
* - make arc4random*() functions thread safe. Use a custom spinlock functionkurt2008-01-011-1/+19
| | | | | | | | | | | instead of the generic pthread macros since free(3) uses __arc4_getbyte() when freeing small sized allocations and the generic pthread macros call malloc(3). - eliminate passing pointers to a static variable with global scope (rs) for additional code clarity and reduction. - shlib minor bumps for libc and libpthread due to new functions. From andreas@ with some bits from me. okay tedu@ marc@ w/some spot checking from millert@
* Avouid a race in atexit() handling by introducing a lock. Problemotto2006-02-221-1/+19
| | | | | originally reported by Gergely Kovacs; help from dhartmei@; ok tedu@ millert@
* major bump to libc and libpthread to break the dependency of amarc2004-06-071-3/+2
| | | | | | particular implementation of libpthread for libc. libc no longer needs pthread.h to compile. OK millert@, brad@, tedu@
* thread safe libc -- 2nd try. OK miod@, millert@marc2002-11-051-3/+13
| | | | Thanks to miod@ for m68k and vax fixes
* back out previous patch.. there are still some vax/m68k issuesmarc2002-11-031-13/+3
|
* libc changes for thread safety. Tested on:marc2002-11-031-3/+13
| | | | | | | alpha (millert@), i386 (marc@), m68k (millert@ and miod@), powerpc (drahn@ and dhartmei@), sparc (millert@ and marc@), sparc64 (marc@), and vax (millert@ and miod@). Thanks to millert@, miod@, and mickey@ for fixes along the way.
* malloc lock helpersd2000-01-141-0/+21