summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move mutex, condvar, and thread-specific data routes, pthread_once, andguenther2017-09-051-303/+0
| | | | | | | | pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
* Get rid of ticket support, replace "struct _spinlock" with "_atomic_lock_t".akfaew2016-09-041-4/+3
| | | | ok tedu@
* Remove _USING_TICKETS, it's defined as 0. No functional change.akfaew2016-09-031-3/+2
| | | | ok tedu@ mpi@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-071-4/+5
| | | | | | | | | | | | | | | | | 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@
* remove dead assignment as reported by llvm.fgsch2013-11-211-2/+2
|
* something's not quite right yet. ticket locks result in more CPU usagetedu2013-06-011-2/+3
| | | | | | and spinning in kernel. partially back out, but in a way that makes going forward again easy. seen by ajacoutot
* cleanup and consolidate the spinlock_lock (what a name!) code.tedu2013-06-011-3/+3
| | | | | | | | | | it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
* Reimplement mutexes, condvars, and rwlocks to eliminate bugs,guenther2012-01-171-3/+3
| | | | | | | | | | | | | particularly the "consume the signal you just sent" hang, and putting the wait queues in userspace. Do cancellation handling in pthread_cond_*wait(), pthread_join(), and sem_wait(). Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add 'abort" argument to thrsleep to close cancellation race; make thr{sleep,wakeup} return errno values via *retval to avoid touching userspace errno.
* Move <machine/spinlock.h> into rthread.h; strip out unnecessary #includesguenther2011-11-061-3/+1
|
* Convert thrsleep() to an absolute timeout with clockid to eliminate aguenther2009-11-271-2/+2
| | | | | | race condition and prep for later support of pthread_condattr_setclock() "get it in" deraadt@, tedu@, cheers by others
* Add f*lockfile() routines to librthreadguenther2009-10-211-0/+305
ok kurt@