summaryrefslogtreecommitdiffstats
path: root/lib/libc/thread (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-073-3/+77
| | | | | | | | | | 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@
* zap trailing newlines; "go for it" deraadtokan2014-07-161-2/+1
|
* 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@
* remove unused zero length file.kurt2007-11-191-0/+0
|
* _FD_LOCK/UNLOCK() is libpthread specific and not needed for librthread, sokurt2007-06-053-24/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | isolate its usage to libpthread only and replace with generic non-static mutex support in the one place it is needed: - remove _FD_LOCK/UNLOCK from lseek and ftruncate in libc and make the functions weak so that libpthread can override with its own new versions that do the locking. - remove _thread_fd_lock/unlock() weak functions from libc and adjust libpthread for the change. - add generic _thread_mutex_lock/unlock/destroy() weak functions in libc to support non-static mutexes in libc and add libpthread and librthread implementations for them. libc can utilize non-static mutexes via the new _MUTEX_LOCK/UNLOCK/DESTROY() macros. Actually these new macros can support both static and non-static mutexes but currently only using them for non-static. - make opendir/closedir/readdir/readdir_r/seekdir/telldir() thread-safe for both thread libraries by using a non-static mutex in the struct _dirdesc (typedef DIR), utilizing it in the *dir functions and remove remaining and incorrect _FD_LOCK/UNLOCK() use in libc. - add comments to both thread libraries to indicate libc depends on the current implementation of static mutex initialization. suggested by marc@ - major bump libc and libpthread due to function removal, structure change and weak symbol conversions. okay marc@, tedu@
* 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-075-51/+39
| | | | | | 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-053-37/+20
| | | | Thanks to miod@ for m68k and vax fixes
* back out previous patch.. there are still some vax/m68k issuesmarc2002-11-033-20/+37
|
* libc changes for thread safety. Tested on:marc2002-11-033-37/+20
| | | | | | | 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.
* put changes back, this time ALL the files.fgsch2001-09-041-3/+3
|
* Back out fgsch@'s tree breaking commits.todd2001-08-301-3/+3
| | | | Test next time, ok?
* fix some const warningsfgsch2001-08-301-3/+3
|
* malloc lock helpersd2000-01-141-0/+21
|
* rename thread_storage to unithread_storage to avoid object name conflictd2000-01-062-3/+3
|
* thread specific storage and fd locking for single-threaded libc (ie, no-ops)d2000-01-063-0/+98