| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Noticed by: bde
Notes:
svn path=/head/; revision=122130
|
| |
|
|
| |
Notes:
svn path=/head/; revision=122089
|
| |
|
|
|
|
|
|
|
|
|
| |
Aside from the POSIX requirements for pthread_atfork(), when
fork()ing, take the malloc lock to keep malloc state consistent
in the child.
Reviewed by: davidxu
Notes:
svn path=/head/; revision=122075
|
| |
|
|
|
|
|
|
|
| |
internal lock, not a pthread spinlock).
Reviewed by: davidxu
Notes:
svn path=/head/; revision=122073
|
| |
|
|
|
|
|
| |
Add a blank line after a variable declaration.
Notes:
svn path=/head/; revision=122072
|
| |
|
|
|
|
|
|
| |
begin with underscores and provide weak definitions without
underscores. Make the pthread spinlock conform to this convention.
Notes:
svn path=/head/; revision=122071
|
| |
|
|
|
|
|
|
|
| |
API).
Reviewed by: davidxu
Notes:
svn path=/head/; revision=122070
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120897
|
| |
|
|
|
|
|
|
|
|
| |
thread state is changed from RUNNING to WAIT state and do some cancellation
operations for every cancellable state.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120896
|
| |
|
|
|
|
|
|
|
| |
for all wrapped syscalls under SMP.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120895
|
| |
|
|
|
|
|
|
|
| |
threads are still referencing the kse by migrating them to initial kse.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120567
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120554
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=120436
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120429
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can clear the pointer to mutex, not the thread doing mutex
handoff. Because _mutex_lock_backout does not hold scheduler
lock while testing THR_FLAGS_IN_SYNCQ and then reading mutex
pointer, it is possible mutex owner begin to unlock and
handoff the mutex to the current thread, and mutex pointer
will be cleared to NULL before current thread reading it, so
current thread will end up with deferencing a NULL pointer,
Fix the race by making mutex waiters to clear their mutex pointers.
While I am here, also save inherited priority in mutex for
PTHREAD_PRIO_INERIT mutex in mutex_trylock_common just like what
we did in mutex_lock_common.
Notes:
svn path=/head/; revision=120403
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120370
|
| |
|
|
|
|
|
|
|
| |
for interrupted field.
Also in _thr_sig_handler, retrieve current signal mask from kernel not
from ucp, the later is pre-unioned mask, not current signal mask.
Notes:
svn path=/head/; revision=120338
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120325
|
| |
|
|
|
|
|
|
|
| |
pthread_md.h. This commit only moves the definition; it does not
change it for any of the platforms. This more easily allows 64-bit
architectures (in particular) to pick a slightly larger stack size.
Notes:
svn path=/head/; revision=120263
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120197
|
| |
|
|
| |
Notes:
svn path=/head/; revision=120109
|
| |
|
|
|
|
|
| |
SIG_CANTMASK to remove unmaskable signal masks.
Notes:
svn path=/head/; revision=120079
|
| |
|
|
|
|
|
| |
it will be inherited in pthread_create.
Notes:
svn path=/head/; revision=120078
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
to avoid potential memory leak, also fix a bug in pthread_create, contention
scope should be inherited when PTHREAD_INHERIT_SCHED is set, and also check
right field for PTHREAD_INHERIT_SCHED, scheduling inherit flag is in sched_inherit.
2. Execute hooks registered by atexit() on thread stack but not on scheduler
stack.
3. Simplify some code in _kse_single_thread by calling xxx_destroy functions.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120074
|
| |
|
|
|
|
|
|
|
| |
invoke signal handler.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120073
|
| |
|
|
|
|
|
|
|
|
|
|
| |
should be a value past to pthread_attr_setguardsize, not a rounded up value.
Also fix a stack size matching bug in thr_stack.c, now stack matching code
uses number of pages but not bytes length to match stack size, so for example,
size 512 bytes and size 513 bytes should both match 1 page stack size.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120072
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=120069
|
| |
|
|
|
|
|
|
|
| |
accordingly.
Reviewed by: deischen
Notes:
svn path=/head/; revision=120068
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=120066
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a shared library or any other dyanmic allocated data block, once
pthread_once_t is initialized, a mutex is allocated, if we unload the
shared library or free those data block, then there is no way to deallocate
the mutex, result is memory leak.
To fix this problem, we don't use mutex field in pthread_once_t, instead,
we use its state field and an internal mutex and conditional variable in
libkse to do any synchronization, we introduce a third state IN_PROGRESS to
wait if another thread is already in invoking init_routine().
Also while I am here, make pthread_once() conformed to pthread cancellation
point specification.
Reviewed by: deischen
Notes:
svn path=/head/; revision=119928
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=119909
|
| |
|
|
|
|
|
| |
pthread_rwlock_timedrwlock.
Notes:
svn path=/head/; revision=119790
|
| |
|
|
|
|
|
|
|
| |
pthread_mutex_timedlock().
Reviewed by: deischen
Notes:
svn path=/head/; revision=119736
|
| |
|
|
| |
Notes:
svn path=/head/; revision=119733
|
| |
|
|
|
|
|
| |
without this change, my atexit test dumps core.
Notes:
svn path=/head/; revision=119732
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of long types for low-level locks.
Add prototypes for some internal libc functions that are
wrapped by the library as cancellation points.
Add memory barriers to alpha atomic swap functions (submitted
by davidxu).
Requested by: bde
Notes:
svn path=/head/; revision=119723
|
| |
|
|
|
|
|
| |
Tested on: SMP
Notes:
svn path=/head/; revision=119700
|
| |
|
|
|
|
|
| |
Reviewed by: davidxu
Notes:
svn path=/head/; revision=119577
|
| |
|
|
|
|
|
|
|
| |
in real world.
Reviewed by: deischen
Notes:
svn path=/head/; revision=119249
|
| |
|
|
|
|
|
|
|
|
|
|
| |
critical region, we wrap some syscalls for thread cancellation point, and
when syscalls returns, we call _thr_leave_cancellation_point, at the time
if a signal comes in, it would be buffered, and when the thread leaves
_thr_leave_cancellation_point, buffered signals will be processed, to avoid
messing up normal syscall errno, we should save and restore errno around
signal handling code.
Notes:
svn path=/head/; revision=119177
|
| |
|
|
|
|
|
|
|
|
| |
destroy thread-specific data. Display a warning when thread
specific data remains after PTHREAD_DESTRUCTOR_ITERATIONS.
Reviewed by: davidxu
Notes:
svn path=/head/; revision=119154
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=119117
|
| |
|
|
| |
Notes:
svn path=/head/; revision=119099
|
| |
|
|
|
|
|
|
|
| |
pthread_exit in main() without creating any thread.
Tessted by: deischen
Notes:
svn path=/head/; revision=119064
|
| |
|
|
|
|
|
|
|
|
|
|
| |
yet, so we can protect some locking code from being interrupted by signal
handling. When KSE mode is turned on, reset the thread flag to scope process
except we are running in 1:1 mode which we needn't turn it off.
Also remove some unused member variables in structure kse.
Tested by: deischen
Notes:
svn path=/head/; revision=119063
|
| |
|
|
| |
Notes:
svn path=/head/; revision=118989
|