Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
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@
|
|
spotted by guenther
|
|
|
|
the sake of libpthread. Probably missed during the a.out->ELF switch, I
can't believe this went unnoticed for so long.
|
|
|
|
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.
|
|
barriers. Therefore it is required to add a memory berrier, so that
it is ensured that all observers observed the change.
ok rapha@
|
|
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@
|
|
|
|
|
|
|
|
struct pthread layout change.
|
|
|
|
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)
|
|
reset the %2 register with _SPINLOCK_LOCKED before retrying.
tobiasu@ hit the problem and figured out that ".set noreorder" is
needed in the ASM
|
|
assembler instructions, and cope with the few changes in return values
location.
|
|
|
|
load and store instructions instead.
ok miod@
|
|
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.
|
|
|
|
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
ok guenther@
|
|
ok guenther@
|
|
errno. The ASM bits for _cerror are sketchy or missing for some archs
but that can be corrected in-tree.
|
|
known good version of ldstub in the kernel. (It's finally in, aja!)
ok kettenis@
|
|
(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@
|
|
Tune the asm slightly to avoid using the stack and use smaller instructions.
Pass threxit() a NULL pointer.
seemed okay to kettenis@
|
|
``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@
|
|
pointed out by brad, ok djm@
|
|
ok kettenis@, art@
|
|
|
|
when compiling without optimization; fix copied from the kernel's atomic.h
ok miod@
|
|
|
|
|
|
|
|
Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.
OK deraadt@
|
|
|
|
|