| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Like autumn leaves on water
don't fear the tedu@
|
|
|
|
| |
ok guenther@
|
|
|
|
|
|
| |
points.
ok fgsch@
|
|
|
|
|
|
|
|
|
| |
SA_RESTART is set, with connect(2) being the exception thus getting its
own state.
as pointed by kurt, threads on this and PS_FDR_WAIT states need to be
set to PS_RUNNING since the current signal dispatching code only looks
at the current thread.
ok kurt@
|
|
|
|
|
| |
static version of pthread. fixes quite a few regression tests.
miod@ ok
|
|
|
|
|
|
|
|
| |
interrupted, thus simulating the system call restart behaviour in the
non-pthreads case.
Add a state for kevent since it shouldn't be restarted regardless of
SA_RESTART being present.
guenther@ ok.
|
|
|
|
|
|
| |
when not switching threads; issue observed by fgsch@
ok marc@
|
|
|
|
| |
ok guenther@
|
|
|
|
|
|
|
| |
thread, then the save and restore of errno, FPU, and regs is unnecessary
and can be skipped.
"looks reasonable" marc@
|
|
|
|
| |
ok guenther
|
|
|
|
|
|
| |
and handle the case of specific_data being NULL.
Pointed out by fgsch@, ok tedu@
|
|
|
|
|
| |
a later pthread_key_create. bug report from Henry Precheur.
ok guenther mikeb
|
| |
|
|
|
|
|
| |
selected thread's state. Fixes random qemu crashes.
ok miod@
|
|
|
|
| |
input and ok from phessler@ and guenther@
|
|
|
|
|
|
|
|
| |
so it works correctly with large offsets (and matches other systems).
This requires adding a new getdirentries syscall, with the old one
renamed to ogetdirentries. All in-tree consumers of getdirentries()
have been updated. Bump libc and libpthread major numbers.
OK and with deraadt@
|
|
|
|
|
|
|
| |
running, then we need to start a gc thread...except when this is
the very call to start a gc thread!
"This works for me" marc@
|
|
|
|
|
|
|
| |
including the scheduling timer, sigmask, fd nonblocking status, and
handling of the signals used by the thread library.
ok marc@, additional testing by ajacoutot@
|
|
|
|
|
|
| |
as the child only has the one thread remaining.
ok marc@
|
|
|
|
|
| |
execve(), just set the close-on-exec flag. Fixes PRs 6183 and 6376.
ok marc@, "seems clearly better" tedu@
|
|
|
|
| |
from brad. ok kurt, who's too busy to commit
|
|
|
|
|
|
|
| |
files or directories when applicable.
The inspiration and name of MACHINE_CPU come from NetBSD, although the way to
provide it to Makefiles is completely different.
ok kettenis@
|
|
|
|
|
| |
the issues seen with www/varnish.
With input and help from guenther@ and kurt@. guenther@ ok
|
|
|
|
|
|
| |
the use of spinlocks and malloc. All needed memory is allocated upfront
and _thread_kern_sig_defer/undefer() is now used to protect critical
sections. okay guenther@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
internally when and where required. Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking. A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization. Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.
committing on behalf of and okay guenther@ now that we have install
media space available.
|
|
|
|
|
| |
a failure to lock the _atfork_mutex after forking. Tested by ajacoutot@
and myself. okay guenther@
|
| |
|
|
|
|
| |
media to fit
|
|
|
|
|
|
|
|
|
| |
for FILEs that don't have real file-descriptors: the fake FILEs
used internally by snprintf/asprintf/vfprintf and friends now avoid
unnecessary locking by calling the internal __vfprintf() routine
directly and we do want to do locking on FILEs created with funopen().
ok kurt@
|
|
|
|
|
|
| |
is needed to avoid deadlocks in popen() on FILE locking.
ok kurt@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
| |
64bit archs to accommodate the growing number of ports that put large
buffers on the stack. Supported by many with no objections.
|
|
|
|
| |
ok marc@, guenther@
|
|
|
|
|
|
| |
Bump lib minor
ok otto@ kurt@ marc@; doc review by jmc@
|
|
|
|
|
|
|
| |
calls to close(), closefrom(), and dup2() don't change it.
ok tedu@, deraadt@, kurt@, millert@, art@, marco@
(miscommit: originally by guenther@)
|
| |
|
|
|
|
|
|
|
| |
because it treated the supplied memory as holding an internal data
structure instead of as the stack space itself
ok kurt@, "looks ok" otto@, tested on hppa by kettenis@
|
|
|
|
|
|
| |
segfaulting.
okay marc@ todd@
|
| |
|
|
|
|
|
|
|
|
| |
getpeername(2) or getsockname(2). Its not needed and causes
threads to block when another thread is blocked and holding the
read lock. Instead just protect against fd state transitions.
Blocking problem reported by David S H Rosenthal from lockss.org
okay beck@ "looks sane" deraadt@
|
|
|
|
|
|
|
| |
sigprocmask(2) in threaded programs.
From Philip Guenther <guenther at sendmail.com> via PR library/5795.
okay marc@
|
|
|
|
|
|
| |
calls vfork(2). "untested, but looks OK" marc@
- document vfork(2), popen(3) and system(3) don't call atfork handlers
in multithreaded programs. okay jmc@
|
| |
|
|
|
|
|
| |
bsd_auth(2) issue when compiled with threads. Reported by Joachim Wieland
<joachim.wieland at credativ.de>. okay otto@ marc@
|
|
|
|
|
|
|
|
|
|
|
| |
instead of the generic pthread macros since free(3) uses __arc4_getbyte()
when freeing small sized allocations and the generic pthread macros call
malloc(3).
- eliminate passing pointers to a static variable with global scope (rs)
for additional code clarity and reduction.
- shlib minor bumps for libc and libpthread due to new functions.
From andreas@ with some bits from me. okay tedu@ marc@ w/some spot
checking from millert@
|
|
|
|
|
|
|
| |
vfork() has only one semantic: "parent stalls until child does execve
or exit" and no other semantic. it is unfair to act as if pthread
vfork() suddenly lacks that semantic.
ok kurt millert kettenis beck
|
|
|
|
|
|
|
| |
uninitialized lock ends up in a locked state. This lead to a deadlock if we
called pthread_key_create().
ok marc@, kurt@
|
|
|
|
| |
pthread_stackseg_np(). With input and okay marc@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
isolate its usage to libpthread only and replace with generic non-static
mutex support in the one place it is needed:
- remove _FD_LOCK/UNLOCK from lseek and ftruncate in libc and make the
functions weak so that libpthread can override with its own new
versions that do the locking.
- remove _thread_fd_lock/unlock() weak functions from libc and adjust
libpthread for the change.
- add generic _thread_mutex_lock/unlock/destroy() weak functions in libc
to support non-static mutexes in libc and add libpthread and librthread
implementations for them. libc can utilize non-static mutexes via the
new _MUTEX_LOCK/UNLOCK/DESTROY() macros. Actually these new macros can
support both static and non-static mutexes but currently only using
them for non-static.
- make opendir/closedir/readdir/readdir_r/seekdir/telldir() thread-safe
for both thread libraries by using a non-static mutex in the struct
_dirdesc (typedef DIR), utilizing it in the *dir functions and remove
remaining and incorrect _FD_LOCK/UNLOCK() use in libc.
- add comments to both thread libraries to indicate libc depends on the
current implementation of static mutex initialization. suggested by
marc@
- major bump libc and libpthread due to function removal, structure
change and weak symbol conversions.
okay marc@, tedu@
|
| |
|