summaryrefslogtreecommitdiffstats
path: root/lib/librthread/arch/m88k (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move mutex, condvar, and thread-specific data routes, pthread_once, andguenther2017-09-051-44/+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@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-071-72/+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@
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-04-181-2/+2
|
* Use %r27 as the thread control block pointer, allowing for __get_tcb() callsmiod2013-08-261-6/+18
| | | | | | | | | | | | | | | | | | | | in libpthread to be optimized away. While there, follow DG/UX's example of using more than one register for thread purposes (after all, the ABI reserves four of them), and also use %r26 to store a pointer to the current thread's errno. Since it is not possible to initialize %r26 at thread creation without intrusive and potentially race-prone changes, have __tfork() reset %r26 to zero, and libpthread's __cerror lazy initialize it. As soon as %r26 is nonzero, it will be used instead of calling __errno(). This means that binaries linked against HEAD libpthread need to run on HEAD kernels, and we are belatedly jumping on the 64-bit time_t bump (since there are no 64-bit time_t m88k snapshots yet). Joint work with guenther@; "Your love of asm is sick and wrong, and yet beautiful." and ok guenther@
* cleanup and consolidate the spinlock_lock (what a name!) code.tedu2013-06-011-6/+6
| | | | | | | | | | 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)
* Make this PIC-aware.miod2013-01-271-2/+6
|
* Add END() directives to the various functions.miod2013-01-111-1/+2
| | | | | | Make the code PIC-aware when necessary (i.e. invoke other functions through the PLT, and access global data through the GOT). No change for non-PIC compilation.
* Switch m88k ports to ELF.miod2013-01-052-14/+14
|
* tfork_thread has been moved to libcguenther2012-03-221-55/+0
|
* Missing cerror bits.miod2012-02-181-0/+55
|
* Reimplement mutexes, condvars, and rwlocks to eliminate bugs,guenther2012-01-171-2/+2
| | | | | | | | | | | | | 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.
* Use __tfork, __get_tcb, and __set_tcb to have a real TCB and per-threadguenther2011-10-171-4/+4
| | | | | errno. The ASM bits for _cerror are sketchy or missing for some archs but that can be corrected in-tree.
* Use the system include <spinlock.h> to get the proper functionmarc2006-01-051-2/+2
| | | | prototype for _atomic_lock
* m88k suppport code for librthread.miod2005-12-232-0/+99