Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
backtrace of example case from sthen@
ok kettenis@ millert@
|
|
|
|
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.
Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@
|
|
|
|
|
|
struct pthread layout change.
|
|
found the hard way by miod. resize and realign all the locks and
semaphores back to the way they were. sometimes i just can't win.
|
|
|
|
and spinning in kernel. partially back out, but in a way that makes going
forward again easy.
seen by ajacoutot
|
|
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)
|
|
|
|
records. From FreeBSD via otto@, with tweaks suggested by guenther@.
Commite on behalf of otto@ who is not around, to ride the libc minor bump.
Causes a librthread minor bump as well (new syscall).
|
|
reset the %2 register with _SPINLOCK_LOCKED before retrying.
tobiasu@ hit the problem and figured out that ".set noreorder" is
needed in the ASM
|
|
sigmask even if there are no pending signals under the temporary
sigmask.
Refactor existing select() and poll() system calls to introduce the
pselect() and ppoll() system calls.
Add rthread wrappers for pselect() and ppoll(). While there, update
cancellation point comments to reflect recent fdatasync() addition.
Minor bumps for libc and librthread due to new symbols.
ok guenther, millert, deraadt, jmc
|
|
many thanks to jmc for noticing
|
|
|
|
From Christian Schulte (cs at schulte.it)
- Use stack->sp instead of recalculating it. From guenther@
okay guenther@
|
|
struct sem --> struct __sem (doesn't belong in public namespace)
Zap pointless _KERNEL tests
ok deraadt@
|
|
|
|
and vax doesn't support symbols that are both weak and undefined (yet?).
sparc issue diagnosed by kettenis@, vax problem found by todd@
|
|
if the initial thread already has a TCB then don't override it, and
if the _dl_allocate_tls() and _dl_free_tls() symbols exist then use
them instead of malloc/free
ok kettenis@
|
|
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.
|
|
|
|
gcc 3 as the compiler. The way constructors are built triggers this warning,
which is fatal because of -Werror. ok espie@ guenther@
|
|
|
|
Makes "make build" build with WARNINGS=Yes on amd64.
ok espie
|
|
we should actually check for _DYNAMIC at run-time rather than checking
for __PIC__ at compile time, since the two are actually independent.
Problem and solution identified by guenther; minor tweaks by me.
ok guenther
|
|
from bsd.lib.mk for C source files.
ok deraadt, pascal
|
|
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@
|
|
- Link libpthread.so with -znodlopen. Because libpthread overrides
the weak symbols in libc, we can't allow it to be dynamically
loaded or else libc's weak symbols might have already been
resolved by ld.so. (Also, major bump because this is technically
a backwards incompat change in behavior, although dlopen()ing
libpthread never really worked.)
- Link libc.so with -nodefaultlibs -lgcc. This ensures that libc
doesn't try to link against itself (which ld.so wouldn't like).
- Change GCC 4 to link shared objects with -lpthread and -lc as
appropriate, now that there's no issues with doing so. This means
that it's no longer necessary to patch software to use -pthread
instead of -lpthread. (Ports tree rejoice!)
Also, to preemptively answer this question: No, this does not
eliminate the need for LD_PRELOAD=libpthread.so. That's a separate
issue that won't be resolved until we eliminate libc's weak symbols.
Discussed extensively on email and icb over the past few months.
ok deraadt
|
|
accordingly so vax can build again.
ok deraadt
|
|
overrides provided by libpthread.a. This ensures that statically
linked threaded programs use (e.g.) __cerror() from libpthread.a
instead of libc.a. (Same idea previously used by libuthread.)
Thanks to fgsch@ for pointing out libuthread's solution to the static
linking problem.
ok guenther@, tedu@;
|
|
based on a diff from Christian Schulte (cs at schulte.it)
|
|
ok guenther@
|
|
|
|
so that it can't get a signal while still running on the parent thread's
stack. Also, pass in sizeof(struct __tfork) to provide forward compat
when more members are added. This is an ABI change, so switch syscall
numbers and bump lib majors this time.
ok deraadt@ matthew@
|
|
|
|
Implementation, documentation and naive regression tests for:
- pthread_spin_init()
- pthread_spin_destroy()
- pthread_spin_lock()
- pthread_spin_trylock()
- pthread_spin_unlock()
Implementation okay guenther@, documentation okay jmc@.
|
|
`Visual inspection looks ok' kurt@.
>From Brad
|
|
The latter contains "#define _POSIX_THREADS 1" which makes gcc 2.95 complain.
|
|
errors similar to PTHREAD_MUTEX_ERRORCHECK, however upon error it aborts.
The rational is that many applications don't check the return values on
pthread functions and will miss the errors that ERRORCHECK returns.
PTHREAD_MUTEX_STRICT_NP will be our default mutex type for awhile
okay guenther@ dcoppa@
|
|
|
|
default mutex type changes to NORMAL, when there is an uninitialized
mutex provided to unlock, allow it to succeed similar to an unlocked
mutex. For other cases abort instead of segfault. okay guenther@
|
|
certain conditions. In the case of unlocking an unlocked mutex we will
allow that to succeed, all other undefined behaviors will result in an
immediate abort(). okay guenther@
|