| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
- Remove the macros MUTEX_TYPE_FAST and MUTEX_TYPE_COUNTING_FAST.
OK'ed by: deischen
|
|
|
|
| |
Noticed by: davidxu
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
been bumped since RELENG_5.
Reviewed by: ru
Approved by: re (not needed for commit check but in principle...)
|
|
|
|
|
|
|
|
| |
Like on libthr, there is an i386_set_gsbase() stub implementation here
to avoid libc.so.5 issues. This should likely be a weak symbol and I
expect this will be fixed soon.
Approved by: re
|
|
|
|
|
|
| |
Reviewed by: deischen
Approved by: re (dwhite)
MFC after : 4 days
|
| |
|
|
|
|
|
| |
that the amd64 kernel implements i386_get/set_gsbase(). All the rest of
the ldt backwards compat code should go away soon.
|
|
|
|
|
| |
This is a little hairy here because the allocation and usage of this
functionality is split into two places in libpthread.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
the lock is held by other thread, but not when nobody owns it. According
to deischen@, this part of code will never be hit in our threads
library, since it does not use locks without wait/wakeup functions.
Spotted by: mingyanguo via ChinaUnix.net forum
Reviewed by: deischen
|
|
|
|
| |
ARM_TP_ADDRESS.
|
|
|
|
|
|
|
| |
changed to use the statclock. Make sure we calculate the value
of a tick correctly in userland.
Noticed by: Kazuaki Oda <kaakun at highway dot ne dot jp>
|
|
|
|
| |
attribute when the library is initialized.
|
|
|
|
|
|
| |
32-bit 64-bit
main thread 2MB 4MB
other threads 1MB 2MB
|
|
|
|
| |
PR: 75273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
signals instead of having more intricate knowledge of thread state
within signal handling.
Simplify signal code because of above (by David Xu).
Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop(). This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.
When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.
Use private mutexes for libc and libpthread. Signals are
deferred while threads hold private mutexes. This fix also
breaks www/linuxpluginwrapper; a patch that fixes it is at
http://people.freebsd.org/~deischen/kse/linuxpluginwrapper.diff
Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).
In collaboration with: davidxu
|
|
|
|
|
| |
kernels. Use the recently exposed direct-set routines instead. This is
only activated for when we compile i386 support libraries on amd64.
|
| |
|
| |
|
|
|
|
|
|
|
| |
a thread in pthread_cond_wait handled a signal can no longer
be canceled.
Reviewed by: deischen
|
|
|
|
|
|
|
|
|
| |
packages expect and seems to be most correct according to the slightly-
ambiguous standards.
MFC after: 1 month
Corroborated by: POSIX <http://tinyurl.com/4uvub>
Reviewed by: silence on threads@
|
|
|
|
| |
any fake value.
|
|
|
|
|
| |
this reduces chances of signal losting problem found by
Peter Holm <peter@holm.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
put DEAD thread on GC list, this closes a race between pthread_join
and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
deallocation code in rtld seems no lock protection or it is broken,
under stress testing, memory is corrupted.
Reviewed by: deischen
patch partly provided by: deischen
|
|
|
|
| |
leak under some cases.
|
|
|
|
|
|
| |
before and after sleeping.
Reviewed by: deischen
|
| |
|
|
|
|
| |
of kse_thr_interrupt.
|
|
|
|
|
| |
allocated space, orignal code left red zone unallocated, but those space
can be allocated by user code, and result was providing no protection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the signal mask and pending signals of the calling thread. These
are stored in userland in libpthread.
There is a small race condition in this patch which could cause
problems if a signal arrives after setting the (kernel) signal
mask and before exec'ing. The thread's set of pending signals
also are not yet installed in the exec'd process. Both of these
will be corrected with the addition of a special syscall.
Reported & Tested by: Joost Bekkers <joost at jodocus dot org>
Reviewed by: julian, davidxu
|
| |
|
|
|
|
|
|
| |
defined. This makes libpthread usable on powerpc.
Approved by: grehan (mentor), deischen
|
| |
|
|
|
|
| |
Reviewed by: deischen
|
|
|
|
| |
Reviewed by: desichen
|
| |
|
| |
|
|
|
|
| |
2. Export symbols needed by debugger.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a knob to force process scope threads. If the environment variable
LIBPTHREAD_PROCESS_SCOPE is set, force all threads to be process
scope threads regardless of how the application creates them. If
LIBPTHREAD_SYSTEM_SCOPE is set (forcing system scope threads), it
overrides LIBPTHREAD_PROCESS_SCOPE.
$ # To force system scope threads
$ LIBPTHREAD_SYSTEM_SCOPE=anything threaded_app
$ # To force process scope threads
$ LIBPTHREAD_PROCESS_SCOPE=anything threaded_app
|
|
|
|
| |
Reviewed by: deischen
|
|
|
|
|
|
|
|
|
|
|
| |
LIBPTHREAD_SYSTEM_SCOPE in the environment.
You can still force libpthread to be built in strictly 1:1 by
adding -DSYSTEM_SCOPE_ONLY to CFLAGS. This is kept for archs
that don't yet support M:N mode.
Requested by: rwatson
Reviewed by: davidxu
|
|
|
|
| |
Dicussed with: deischen
|
|
|
|
| |
kse_switchin syscall.
|
| |
|