| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
forward ABI compatibility for fcntl to the thread libraries.
Notes:
svn path=/stable/6/; revision=179609
|
| |
|
|
|
|
|
|
|
| |
this copes with the fact that during a fork the child may get
really screwy state in the threading system due to the
sudden vaporisation of it's sibling threads.
Notes:
svn path=/stable/6/; revision=175977
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is a partial MFC of rev 1.126 from HEAD's libkse. This only merges the
fix which causes stderr_debug to write output to STDERR_FILENO instead
of STDOUT_FILENO. This is known to fix (or workaround) some mono-related
build problems.
Approved by: re (kensmith)
Notes:
svn path=/stable/6/; revision=174201
|
| |
|
|
|
|
|
|
|
| |
In _pthread_key_create() ensure that libkse is initialized.
Approved by: re (kensmith)
Notes:
svn path=/stable/6/; revision=173922
|
| |
|
|
| |
Notes:
svn path=/stable/6/; revision=165060
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Install shared libpthread library into /lib; needed by some
/sbin programs.
PR: bin/88404
Reviewed by: ru@
Approved by: re@ (kensmith@)
Notes:
svn path=/stable/6/; revision=162770
|
| |
|
|
| |
Notes:
svn path=/stable/6/; revision=161913
|
| |
|
|
|
|
|
| |
make signal(SIGINFO, handler) work for libpthread.
Notes:
svn path=/stable/6/; revision=159877
|
| |
|
|
|
|
|
|
| |
pthread.map 1.18
thread/thr_symbols.c 1.4
Notes:
svn path=/stable/6/; revision=158852
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only catch SIGINFO (for dumping thread states) when LIBPTHREAD_DEBUG
is defined in the environment.
Modify the code path of the ifdef NOTYET part of _kse_single_thread():
o Don't reinitialise the atfork() handler list in the child. We
are meant to call the child handler, and on subsequent fork()s
should call all three functions as normal.
o Don't reinitialise the thread specific keyed data in the
child after a fork. Applications may require this for context.
o Reinitialise curthread->tlflags after removing ourselves from
(and reinitialising) the various internal thread lists.
o Reinitialise __malloc_lock in the child after fork() (to balance
our explicitly taking the lock prior to the fork()).
With these changes, it is possible to enable the NOTYET code in
thr_kern.c to allow the use of non-async-safe functions after
fork()ing from a threaded program.
Eliminate a race condition in timed waits (cv, mutex, and sleeps).
Don't forget to initialize a tailq before using it.
For the ``#ifdef NOTYET'' code that allows calling non-async-safe
functions in the child after a fork() from a threaded process,
use __sys_setprocmask() rather than setprocmask() to keep our
signal handling sane. Without this fix, signals are essentially
ignored in said child and things such as protection violations
result in an endless busy loop.
Allocate a thread's tcb last so it is easier to handle failures to
malloc() siginfo.
Include needed headers that were obtained through <pthread.h>. Sort headers
while here.
amd64
-----
Fix a race condition introduced when redzones were added. Use an
atomic operation to return and adjust the stack (amd64).
test
-----
o Include <string.h>
o Make this ILP32/LP64 clean: cast pointers to long.
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=156790
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Export following functions:
_pthread_condattr_getpshared
_pthread_condattr_setpshared
_pthread_mutexattr_getpshared
_pthread_mutexattr_setpshared
pthread_condattr_getpshared
pthread_condattr_setpshared
pthread_mutexattr_getpshared
pthread_mutexattr_setpshared
Notes:
svn path=/stable/6/; revision=153443
|
| |
|
|
|
|
|
| |
Add file thr_mattr_pshared.c and thr_condattr_pshared.c.
Notes:
svn path=/stable/6/; revision=153442
|
| |
|
|
| |
Notes:
svn path=/stable/6/; revision=151613
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| Add usleep to the map files.
|
| Noticed by: davidxu
|
| Revision Changes Path
| 1.15 +2 -0 src/lib/libpthread/pthread.map
| 1.4 +2 -0 src/lib/libthr/pthread.map
Approved by: re (kensmith)
Ok'ed by: deischen, davidxu
Notes:
svn path=/stable/6/; revision=151097
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
| Add a cancellation point for usleep().
|
| Revision Changes Path
| 1.9 +16 -1 src/lib/libpthread/thread/thr_sleep.c
Approved by: re (kensmith)
Ok'ed by: deischen, davidxu
Notes:
svn path=/stable/6/; revision=151096
|
| |
|
|
|
|
|
|
|
| |
than void *.
Approved by: re (kensmith)
Notes:
svn path=/stable/6/; revision=148750
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whose version has not already been bumped since RELENG_5 are being
bumped.
Revisions of files being MFC-ed:
> Path Revision
> src/gnu/lib/libdialog/Makefile 1.43
> src/gnu/lib/libg2c/Makefile 1.16
> src/gnu/lib/libobjc/Makefile 1.27
> src/gnu/lib/libreadline/Makefile.inc 1.12
> src/gnu/lib/libregex/Makefile 1.32
> src/gnu/lib/libstdc++/Makefile 1.56
> src/kerberos5/lib/Makefile.inc 1.7
> src/lib/Makefile.inc 1.3
> src/lib/libalias/Makefile 1.31
> src/lib/libarchive/Makefile 1.37
> src/lib/libbegemot/Makefile 1.3
> src/lib/libbluetooth/Makefile 1.2
> src/lib/libbsnmp/Makefile.inc 1.6
> src/lib/libbz2/Makefile 1.6
> src/lib/libc_r/Makefile 1.42
> src/lib/libcrypt/Makefile 1.36
> src/lib/libdevstat/Makefile 1.15
> src/lib/libdevstat/devstat.h 1.11
> src/lib/libedit/Makefile 1.29
> src/lib/libexpat/Makefile 1.5
> src/lib/libfetch/Makefile 1.45
> src/lib/libftpio/Makefile 1.14
> src/lib/libgpib/Makefile 1.2
> src/lib/libipsec/Makefile 1.17
> src/lib/libkiconv/Makefile 1.3
> src/lib/libmagic/Makefile 1.7
> src/lib/libmp/Makefile 1.10
> src/lib/libncp/Makefile 1.6
> src/lib/libncurses/Makefile 1.79
> src/lib/libnetgraph/Makefile 1.11
> src/lib/libngatm/Makefile 1.6
> src/lib/libopie/Makefile 1.21
> src/lib/libpam/Makefile.inc 1.17
> src/lib/libpthread/Makefile 1.54
> src/lib/libradius/Makefile 1.12
> src/lib/libsdp/Makefile 1.4
> src/lib/libsmb/Makefile 1.8
> src/lib/libtacplus/Makefile 1.7
> src/lib/libthr/Makefile 1.14
> src/lib/libthread_db/Makefile 1.6
> src/lib/libugidfw/Makefile 1.7
> src/lib/libusbhid/Makefile 1.10
> src/lib/libutil/Makefile 1.57
> src/lib/libvgl/Makefile 1.11
> src/lib/libwrap/Makefile 1.17
> src/lib/libypclnt/Makefile 1.13
> src/lib/msun/Makefile 1.72
> src/secure/lib/libcrypto/Makefile 1.74
> src/secure/lib/libssh/Makefile 1.35
> src/secure/lib/libssl/Makefile 1.22
> src/usr.sbin/bsnmpd/modules/Makefile.inc 1.10
Reviewed by: ru
Approved by: re (scottl)
Notes:
svn path=/stable/6/; revision=148300
|
| |
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=147673
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: deischen
Approved by: re (dwhite)
MFC after : 4 days
Notes:
svn path=/head/; revision=147533
|
| |
|
|
| |
Notes:
svn path=/head/; revision=146832
|
| |
|
|
|
|
|
|
| |
that the amd64 kernel implements i386_get/set_gsbase(). All the rest of
the ldt backwards compat code should go away soon.
Notes:
svn path=/head/; revision=145569
|
| |
|
|
|
|
|
|
| |
This is a little hairy here because the allocation and usage of this
functionality is split into two places in libpthread.
Notes:
svn path=/head/; revision=145039
|
| |
|
|
| |
Notes:
svn path=/head/; revision=144765
|
| |
|
|
| |
Notes:
svn path=/head/; revision=143946
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=142670
|
| |
|
|
|
|
|
| |
ARM_TP_ADDRESS.
Notes:
svn path=/head/; revision=142571
|
| |
|
|
|
|
|
|
|
|
| |
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>
Notes:
svn path=/head/; revision=142047
|
| |
|
|
|
|
|
| |
attribute when the library is initialized.
Notes:
svn path=/head/; revision=141949
|
| |
|
|
|
|
|
|
|
| |
32-bit 64-bit
main thread 2MB 4MB
other threads 1MB 2MB
Notes:
svn path=/head/; revision=141822
|
| |
|
|
|
|
|
| |
PR: 75273
Notes:
svn path=/head/; revision=139052
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=139023
|
| |
|
|
|
|
|
|
| |
kernels. Use the recently exposed direct-set routines instead. This is
only activated for when we compile i386 support libraries on amd64.
Notes:
svn path=/head/; revision=137295
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137294
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137283
|
| |
|
|
|
|
|
|
|
|
| |
a thread in pthread_cond_wait handled a signal can no longer
be canceled.
Reviewed by: deischen
Notes:
svn path=/head/; revision=137105
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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@
Notes:
svn path=/head/; revision=137095
|
| |
|
|
|
|
|
| |
any fake value.
Notes:
svn path=/head/; revision=136910
|
| |
|
|
|
|
|
|
| |
this reduces chances of signal losting problem found by
Peter Holm <peter@holm.cc>
Notes:
svn path=/head/; revision=136847
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=136846
|
| |
|
|
|
|
|
| |
leak under some cases.
Notes:
svn path=/head/; revision=136735
|
| |
|
|
|
|
|
|
|
| |
before and after sleeping.
Reviewed by: deischen
Notes:
svn path=/head/; revision=136286
|
| |
|
|
| |
Notes:
svn path=/head/; revision=136227
|
| |
|
|
|
|
|
| |
of kse_thr_interrupt.
Notes:
svn path=/head/; revision=136223
|
| |
|
|
|
|
|
|
| |
allocated space, orignal code left red zone unallocated, but those space
can be allocated by user code, and result was providing no protection.
Notes:
svn path=/head/; revision=136190
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=135809
|
| |
|
|
| |
Notes:
svn path=/head/; revision=135735
|
| |
|
|
|
|
|
|
|
| |
defined. This makes libpthread usable on powerpc.
Approved by: grehan (mentor), deischen
Notes:
svn path=/head/; revision=135714
|
| |
|
|
| |
Notes:
svn path=/head/; revision=134326
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=134319
|
| |
|
|
|
|
|
| |
Reviewed by: desichen
Notes:
svn path=/head/; revision=134115
|