summaryrefslogtreecommitdiffstats
path: root/lib/librthread/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move mutex, condvar, and thread-specific data routes, pthread_once, andguenther2017-09-0511-420/+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@
* Add support for AArch64.patrick2017-01-111-0/+49
|
* Now that all non-ARMv7 platforms are gone, tedu the legacy atomicpatrick2017-01-051-10/+3
| | | | | | locking code. ok kettenis@
* retire sparctedu2016-09-011-41/+0
|
* remove hppa64 port, which we never got going beyond broken single users.deraadt2016-05-111-41/+0
| | | | | | hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-0712-604/+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@
* replace 0xf57ff05f with dmb syjsg2016-04-091-2/+2
| | | | spotted by guenther
* No point in keeping the threading support for vax, I guessguenther2016-03-102-76/+0
|
* Put the right number of leading underscores in ___cerror and __cerror, formiod2015-05-121-2/+3
| | | | | the sake of libpthread. Probably missed during the a.out->ELF switch, I can't believe this went unnoticed for so long.
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-04-182-4/+4
|
* Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod2014-03-182-90/+0
| | | | | | | this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
* Following the ARM manuals and cookbooks, ldrex/strex don't have implicitpatrick2013-08-281-1/+2
| | | | | | | barriers. Therefore it is required to add a memory berrier, so that it is ensured that all observers observed the change. ok rapha@
* 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@
* VAX ELF userland bits. Consists mostly of register prefix additions.miod2013-07-051-5/+5
|
* fix typo in commentmiod2013-06-041-2/+2
|
* unbreakmiod2013-06-031-2/+2
|
* Despite tedu's efforts, fix ERRNOPTR_OFFSET which has changed due to recentmiod2013-06-032-4/+4
| | | | struct pthread layout change.
* Make arm compile again. -mojmaja2013-06-021-1/+2
|
* cleanup and consolidate the spinlock_lock (what a name!) code.tedu2013-06-0114-93/+79
| | | | | | | | | | 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)
* If the lock is contended, such that the 'sc' fails, then we need toguenther2013-05-061-4/+7
| | | | | | | reset the %2 register with _SPINLOCK_LOCKED before retrying. tobiasu@ hit the problem and figured out that ".set noreorder" is needed in the ASM
* Userland bits for m68k/ELF. Mostly addition of register prefixes to themiod2013-02-021-12/+11
| | | | | assembler instructions, and cope with the few changes in return values location.
* Make this PIC-aware.miod2013-01-271-2/+6
|
* ARMv7 doesn't support the atomic SWP instruction anymore. Use the atomicpatrick2013-01-231-1/+12
| | | | | | load and store instructions instead. ok miod@
* 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
|
* Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccpascal2012-08-221-2/+2
| | | | | | | invocations. This allows us to use the compiler builtin define __PIC__ to check for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot. ok matthew@, conceptually ok kurt@
* Provide _atomic_lock() and __cerror() for hppa64. Makes hppa64 build again.jsing2012-04-132-0/+74
|
* tfork_thread has been moved to libcguenther2012-03-2213-921/+0
|
* Sync the assembly statements with <machine/lock.h> for consistency.miod2012-03-031-5/+9
|
* fix __errno symbol namemiod2012-02-271-2/+2
|
* Fix buglets.miod2012-02-261-3/+3
|
* __cerror gets invoked with errno in v0, not a0.miod2012-02-261-2/+2
|
* Fix label for threaded binaries to link.miod2012-02-261-2/+2
|
* Missing cerror bits.miod2012-02-181-0/+55
|
* Allow librthread to build on mips64.miod2012-02-172-11/+72
|
* Reimplement mutexes, condvars, and rwlocks to eliminate bugs,guenther2012-01-1713-28/+28
| | | | | | | | | | | | | 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.
* Add the __cerror asm bits for per-thread errno support for powerpc.kettenis2011-11-091-0/+41
| | | | ok guenther@
* Add the __cerror asm bits for per-thread errno support for hppa.kettenis2011-11-081-0/+33
| | | | ok guenther@
* Use __tfork, __get_tcb, and __set_tcb to have a real TCB and per-threadguenther2011-10-1722-68/+527
| | | | | errno. The ASM bits for _cerror are sketchy or missing for some archs but that can be corrected in-tree.
* Deal with the horror that is gcc asm constraints by copying theguenther2011-10-132-8/+4
| | | | | | known good version of ldstub in the kernel. (It's finally in, aja!) ok kettenis@
* Increase the stack offset for the new rthread from (BIAS+128) toguenther2011-10-131-4/+5
| | | | | | | | (BIAD+CC64FSZ) so that there's sufficient space even when _rthread_start is compiled without optimization. Also, clear the frame pointer to help make gdb happier. ok kettenis@
* Convert rfork_thread() from int$80 to syscall.guenther2011-10-131-18/+12
| | | | | | | Tune the asm slightly to avoid using the stack and use smaller instructions. Pass threxit() a NULL pointer. seemed okay to kettenis@
* Sync with amd64, to allow this to compile without warnings with gcc4:miod2010-12-031-6/+6
| | | | | | ``Correct the _atomic_lock() asm so that gcc accepts the constraints when compiling without optimization; fix copied from the kernel's atomic.h'' spotted by jim@
* rfork_thread() lacked PIC handling for CERROR, resulting in a text relocationguenther2009-09-271-1/+8
| | | | pointed out by brad, ok djm@
* rfork_thread() lacked PIC handling for CERROR, resulting in a text relocationguenther2009-09-241-1/+6
| | | | ok kettenis@, art@
* A much better atomic lock routine.miod2009-06-011-27/+10
|
* Correct the _atomic_lock() asm so that gcc accepts the constraintsguenther2009-06-011-4/+4
| | | | | | when compiling without optimization; fix copied from the kernel's atomic.h ok miod@
* these are public domain, verified with author; spotted by jjderaadt2009-02-151-1/+4
|
* the license on this is PD; david leonard says soderaadt2008-10-023-3/+9
|
* Assert my copyright on files I gave to d@ back in 1998.drahn2008-10-011-2/+18
|