Age | Commit message (Collapse) | Author |
|
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@
|
|
- new sentence, new line
|
|
Correct misnaming in STANDARDS section
ok brad@ otto@
|
|
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@
|
|
now that we support all the _r functions required by POSIX 1003.1-2001.
Also define _POSIX_REENTRANT_FUNCTIONS. OK kurt@ deraadt@
|
|
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@
|
|
ok espie@, beck@
|
|
if a syscall is OBSOL..
|
|
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
|
|
from pjanzen; ok marc
|
|
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@
|
|
by replicating part of $$dyncall in the code that sets up a thread's initial
stack frame. Also make sure we actually reserve some space for that initial
stack frame.
ok miod@
|
|
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@
|
|
|
|
|
|
|
|
casting when safe or adding ARGSUSED where needed. Reviewed and
improvements from millert@ and marc@. okay marc@
|
|
- use the correct types
- mark _thread_gc() w/ARGSUSED
- fix a 'a cast does not yield an lvalue'
okay marc@
|
|
allignment. okay marc@
|
|
|
|
|
|
calling _get_curthread() again. fixes some lint warnings. okay marc@
|
|
merge _thread_fd_unlock_thread() into _thread_fd_unlock(). okay marc@
|
|
applications that increase nofiles using setrlimit(2). ok marc@
|
|
|
|
|
|
from the parent to all non-blocking. This prevents the child from restoring
the file to be blocking upon close() and causing the parent to deadlock
when it later attempts to utilize the blocking fd. Corrects the netbeans
build failure caused by the jdk forkAndExec() function that replaces the
std fd's before execvp(). okay marc@
|
|
build warnings noticed by david@. okay millert@ marc@
|
|
conditionally compile code using these defines will work.
okay tedu@, marc@, milllert@
|
|
always saved upon context switches, as FPU registers are heavily used for
long long computations (don't ask). Gcc default to -m4.
Credits to drahn@ otto@ and deraadt@ for feedback and help testing.
Upgrade procedure if you don't want to use the damn snapshots:
- build and install new kernel, reboot off it
- build new gcc, do not install it yet
- make includes
- install new gcc
- build and install lib/csu and lib/libc
- make build
|
|
|
|
ok marc@, krw@
|
|
closed so that a threaded child process can still read it without blocking.
However, leaving stdin/out/err non-blocking when closed is bad because it
can be shared with non-threaded apps that can't deal with a non-blocking
file descriptor (i.e. cat). Therefore special case stdin/out/err pipes so
that they are reset to blocking upon a close(). Tested by robert@, jolan@
and myself with multiple OOo builds on mp systems where the problem was
seen more frequently.
|
|
|
|
|
|
need to bail from _thread_kern_poll() when a file descriptor is in
closing state. corrects segfault reported by ckuethe@
|
|
this can potentially block indefinitely. Instead just
protect against fd state transitions and perform
the _thread_sys_shutdown(). Fixes deadlock reported by
Tero Koskinen <tero.koskinen at iki.fi>. okay kettenis@
|