| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Fix off-by-one nanosecond in macro TIMESPEC_ADD.
Notes:
svn path=/stable/5/; revision=147642
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increase the default stacksizes:
32-bit 64-bit
main thread 2MB 4MB
other threads 1MB 2MB
Approved by: eischen
re (scottl no longer objects since 5.4 is out)
Notes:
svn path=/stable/5/; revision=146102
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
including:
Pull debug symbols in for statically linked binaries.
gcc -O2 cleanups.
Don't call _thr_start_sig_daemon() when SYSTEM_SCOPE_ONLY is defined.
If a system scope thread didn't set a timeout, don't call the clock_gettime
system call before and after sleeping.
Add missing reference count drops to close a memory leak.
Save cancelflags in signal frame.
Use a generic way to back threads out of wait queues when handling
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 breaks
an internal system ABI that old versions of the
www/linuxpluginwrapper port depend on. Upgrading that port to the
latest version will fix that.
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()).
Don't panic when sigsuspend is interrupted by a cancellation.
Notes:
svn path=/stable/5/; revision=141287
|
| |
|
|
|
|
|
| |
this reduces chances of losing a signal.
Notes:
svn path=/stable/5/; revision=141285
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revision Changes Path
1.58 +1 -0 src/lib/libpthread/thread/thr_create.c
1.14 +1 -1 src/lib/libpthread/thread/thr_find_thread.c
1.115 +27 -10 src/lib/libpthread/thread/thr_kern.c
1.119 +15 -11 src/lib/libpthread/thread/thr_private.h
1.81 +1 -2 src/lib/libpthread/thread/thr_sig.c
fix race conditions
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=137094
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Capture calls to execve() to make sure that the
signal mask is set correctly on the thread that is going to
continue in the new process. Required for Posix compliance.
This is not perfect and better fixes may happen after 5.3
is released.
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=136394
|
| |
|
|
|
|
|
|
|
|
|
| |
Allocate red zone and stack space together and then split red zone from
allocated space, orignal code left red zone unallocated, but those space
can be allocated by user code, and result was providing no protection.
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=136308
|
| |
|
|
| |
Notes:
svn path=/stable/5/; revision=136302
|
| |
|
|
|
|
|
| |
2. Export symbols needed by debugger.
Notes:
svn path=/head/; revision=133801
|
| |
|
|
| |
Notes:
svn path=/head/; revision=133800
|
| |
|
|
| |
Notes:
svn path=/head/; revision=133756
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=133563
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=133344
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=133269
|
| |
|
|
|
|
|
| |
Dicussed with: deischen
Notes:
svn path=/head/; revision=133047
|
| |
|
|
|
|
|
| |
libthread_db. Both headers are included seperately.
Notes:
svn path=/head/; revision=132333
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132124
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132122
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132121
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Add global varible _libkse_debug, debugger uses the varible to identify
libpthread. when the varible is written to non-zero by debugger, libpthread
will take some special action at context switch time, it will check
TMDF_DOTRUNUSER flags, if a thread has the flags set by debugger, it won't
be scheduled, when a thread leaves KSE critical region, thread checks
the flag, if it was set, the thread relinquish CPU.
2. Add pq_first_debug to select a thread allowd to run by debugger.
3. Some names prefixed with _thr are renamed to _thread prefix.
which is allowed to run by debugger.
Notes:
svn path=/head/; revision=132120
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sigsuspend, thread shouldn't wait, in old code, it may be
ignored.
When a signal handler is invoked in sigsuspend, thread gets
two different signal masks, one is in thread structure,
sigprocmask() can retrieve it, another is in ucontext
which is a third parameter of signal handler, the former is
the result of sigsuspend mask ORed with sigaction's sa_mask
and current signal, the later is the mask in thread structure
before sigsuspend is called. After signal handler is called,
the mask in ucontext should be copied into thread structure,
and becomes CURRENT signal mask, then sigsuspend returns to
user code.
Reviewed by: deischen
Tested by: Sean McNeil <sean@mcneil.com>
Notes:
svn path=/head/; revision=130374
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
mode (where the forked thread is the one and only thread and
is marked as system scope), set the system scope flag before
initializing the signal mask. This prevents trying to use
internal locks that haven't yet been initialized.
Reported by: Dan Nelson <dnelson at allantgroup.com>
Reviewed by: davidxu
Notes:
svn path=/head/; revision=128041
|
| |
|
|
|
|
|
| |
in return value not in errno.
Notes:
svn path=/head/; revision=127102
|
| |
|
|
| |
Notes:
svn path=/head/; revision=126952
|
| |
|
|
|
|
|
|
|
|
|
| |
These files had tags after the copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).
Approved by: rwatson (mentor)
Notes:
svn path=/head/; revision=125668
|
| |
|
|
|
|
|
|
|
|
|
| |
semaphores. Also add cancellation cleanup handlers to keep semaphores
in a consistent state.
Submitted in part by: davidxu
Reviewed by: davidxu
Notes:
svn path=/head/; revision=125522
|
| |
|
|
|
|
|
| |
points to sem_wait() and sem_timedwait(). Also make sem_post signal-safe.
Notes:
svn path=/head/; revision=125373
|
| |
|
|
|
|
|
|
|
| |
unlock the mutex, old code confuses some programs when it returns EINVAL.
Noticed by: bland
Notes:
svn path=/head/; revision=124606
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
on a rwlock while there are writers waiting. We normally favor
writers but when a reader already has at least one other read lock,
we favor the reader. We don't track all the rwlocks owned by a
thread, nor all the threads that own a rwlock -- we just keep
a count of all the read locks owned by a thread.
PR: 24641
Notes:
svn path=/head/; revision=124252
|
| |
|
|
|
|
|
| |
enable sigaltstack for scope system thread.
Notes:
svn path=/head/; revision=124095
|
| |
|
|
| |
Notes:
svn path=/head/; revision=124056
|
| |
|
|
| |
Notes:
svn path=/head/; revision=124055
|
| |
|
|
| |
Notes:
svn path=/head/; revision=123975
|
| |
|
|
|
|
|
|
|
|
|
| |
is supported, for scope system process, kernel signal bits need to be
changed.
Reviewed by: deischen
Tested on : i386 amd64 ia64
Notes:
svn path=/head/; revision=123974
|
| |
|
|
| |
Notes:
svn path=/head/; revision=123933
|
| |
|
|
|
|
|
| |
new fork() wrapper.
Notes:
svn path=/head/; revision=123668
|
| |
|
|
| |
Notes:
svn path=/head/; revision=123666
|
| |
|
|
|
|
|
|
|
|
|
|
| |
likely to be non-zero. When leaving the cancellation point, check
the return value against -1 to see if cancellation should be
checked. While I'm here, make the same change to connect() just
to be consisitent.
Pointed out by: davidxu
Notes:
svn path=/head/; revision=123365
|
| |
|
|
| |
Notes:
svn path=/head/; revision=123356
|
| |
|
|
| |
Notes:
svn path=/head/; revision=123355
|
| |
|
|
|
|
|
| |
avoids signal to be blocked when otherwise it can be handled.
Notes:
svn path=/head/; revision=123314
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_thr_leave_cancellation_point to _thr_cancel_leave, add a parameter
to _thr_cancel_leave to indicate whether cancellation point should be
checked, this gives us an option to not check cancallation point if
a syscall successfully returns to avoid any leaks, current I have
creat(), open() and fcntl(F_DUPFD) to not check cancellation point
after they sucessfully returned.
Replace some members in structure kse with bit flags to same some
memory.
Conditionally compile THR_ASSERT to nothing if _PTHREAD_INVARIANTS is
not defined.
Inline some small functions in thr_cancel.c.
Use __predict_false in thr_kern.c for some executed only once code.
Reviewd by: deischen
Notes:
svn path=/head/; revision=123312
|
| |
|
|
| |
Notes:
svn path=/head/; revision=123310
|
| |
|
|
|
|
|
|
|
|
| |
locks for [libc] spinlock implementation. This was previously backed
out because it exposed a bug in ia64 implementation.
OK'd by: marcel
Notes:
svn path=/head/; revision=123297
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
through branch predict as suggested in INTEL IA32 optimization guide.
2.Allocate siginfo arrary separately to avoid pthread to be allocated at
2K boundary, which hits L1 address alias problem and causes context
switch to be slow down.
3.Simplify context switch code by removing redundant code, code size is
reduced, so it is expected to run faster.
Reviewed by: deischen
Approved by: re (scottl)
Notes:
svn path=/head/; revision=123048
|
| |
|
|
|
|
|
|
|
|
|
| |
in init_main_thread. Also don't initialize lock and lockuser again for initial
thread, it is already done by _thr_alloc().
Reviewed by: deischen
Approved by: re (scottl)
Notes:
svn path=/head/; revision=123047
|
| |
|
|
|
|
|
|
|
| |
locks until we know why this breaks ia64.
Reported by: marcel
Notes:
svn path=/head/; revision=122801
|
| |
|
|
|
|
|
|
|
| |
signal handling mode, there is no chance to handle the signal, something
must be wrong in the library, just call kse_thr_interrupt to dump its core.
I have the code for a long time, but forgot to commit it.
Notes:
svn path=/head/; revision=122338
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=122299
|
| |
|
|
|
|
|
| |
Reviewed by: bde
Notes:
svn path=/head/; revision=122131
|