| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Don't free them, so some code can still reference them.
Reviewed by: deischen
Notes:
svn path=/head/; revision=118985
|
| |
|
|
|
|
|
| |
a key is less than 0.
Notes:
svn path=/head/; revision=118984
|
| |
|
|
|
|
|
| |
time.
Notes:
svn path=/head/; revision=118850
|
| |
|
|
|
|
|
| |
Reviewed by: deischen, julian
Notes:
svn path=/head/; revision=118817
|
| |
|
|
|
|
|
|
|
| |
signal can causes process to exit.
Reviewed by: deischen
Notes:
svn path=/head/; revision=118748
|
| |
|
|
|
|
|
| |
uninitialize rtld lock after thread mode shutdown.
Notes:
svn path=/head/; revision=118747
|
| |
|
|
|
|
|
|
|
|
|
| |
otherwise masks all signals until fork() returns, in child process,
we reset library state before restoring signal masks until we reach
a safe to point.
Reviewed by: deischen
Notes:
svn path=/head/; revision=118746
|
| |
|
|
|
|
|
|
|
| |
on writer lock. This is first cut at rwlock for rtld.
Submitted by: desichen
Notes:
svn path=/head/; revision=118745
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=118744
|
| |
|
|
|
|
|
|
|
|
| |
o Fix a bug in kse_free_unlocked(), kcb_dtor shouldn't be called because
the KSE is cached and will be resued in _kse_alloc().
Reviewed by: deischen
Notes:
svn path=/head/; revision=118676
|
| |
|
|
|
|
|
|
|
|
| |
thread. It should only be called by the current kse and
never by a KSE on behalf of another.
Submitted by: davidxu
Notes:
svn path=/head/; revision=118516
|
| |
|
|
|
|
|
|
|
| |
makecontext(). We only supply 3, not 4. This is mostly harmless,
except that on ia64 the garbage can include NaT bits, resulting
in NaT consumption faults.
Notes:
svn path=/head/; revision=118514
|
| |
|
|
|
|
|
|
|
|
|
|
| |
archs that can (or are required to) have per-thread registers.
Tested on i386, amd64; marcel is testing on ia64 and will
have some follow-up commits.
Reviewed by: davidxu
Notes:
svn path=/head/; revision=118510
|
| |
|
|
| |
Notes:
svn path=/head/; revision=118254
|
| |
|
|
|
|
|
|
|
|
| |
from one of my last commits. This only affected priority ceiling
mutexes.
Pointy hat to: deischen
Notes:
svn path=/head/; revision=118206
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=118075
|
| |
|
|
|
|
|
|
|
|
|
| |
This eliminates ping-ponging of locks, where the idle KSE wakes
up only to find the lock it needs is being held. This gives
little or no gain to M:N mode but greatly speeds up 1:1 mode.
Reviewed & Tested by: davidxu
Notes:
svn path=/head/; revision=117907
|
| |
|
|
|
|
|
|
|
| |
send signal to current thread.
Reviewed by: deischen
Notes:
svn path=/head/; revision=117758
|
| |
|
|
|
|
|
|
|
|
|
| |
when it blocks; it only gets reset when it yields.
Properly set a thread's default stack guardsize.
Reviewed by: davidxu
Notes:
svn path=/head/; revision=117715
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handed-off/signaled to a higher priority thread. Note that when
there are idle KSEs that could run the higher priority thread,
we still add the preemption point because it seems to take the
kernel a while to schedule an idle KSE. The drawbacks are that
threads will be swapped more often between CPUs (KSEs) and
that there will be an extra userland context switch (the idle
KSE is still woken and will probably resume the preempted
thread). We'll revisit this if and when idle CPU/KSE wakeup
times improve.
Inspired by: Petri Helenius <pete@he.iki.fi>
Reviewed by: davidxu
Notes:
svn path=/head/; revision=117714
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is system bound thread and when it is blocked, no upcall is generated.
o Add ability to libkse to allow it run in pure 1:1 threading mode,
defining SYSTEM_SCOPE_ONLY in Makefile can turn on this option.
o Eliminate code for installing dummy signal handler for sigwait call.
o Add hash table to find thread.
Reviewed by: deischen
Notes:
svn path=/head/; revision=117706
|
| |
|
|
| |
Notes:
svn path=/head/; revision=117366
|
| |
|
|
|
|
|
|
|
|
|
| |
its waitset, but if the signal is not masked by the thread, the signal
can interrupt the thread and signal action can be invoked by the thread,
sigwait should return with errno set to EINTR.
Also save and restore thread internal state(timeout and interrupted)
around signal handler invoking.
Notes:
svn path=/head/; revision=117353
|
| |
|
|
| |
Notes:
svn path=/head/; revision=117345
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=117344
|
| |
|
|
|
|
|
| |
in last commit.
Notes:
svn path=/head/; revision=117305
|
| |
|
|
| |
Notes:
svn path=/head/; revision=117301
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=117300
|
| |
|
|
|
|
|
| |
it in one line.
Notes:
svn path=/head/; revision=117297
|
| |
|
|
| |
Notes:
svn path=/head/; revision=117217
|
| |
|
|
|
|
|
| |
outside of lock.
Notes:
svn path=/head/; revision=117216
|
| |
|
|
|
|
|
| |
it only need purely wait in user space.
Notes:
svn path=/head/; revision=117197
|
| |
|
|
|
|
|
| |
is not enough.
Notes:
svn path=/head/; revision=117193
|
| |
|
|
|
|
|
|
| |
Use THR_CONDQ_CLEAR not THR_COND_SET in cond_queue_deq, current
cond_queue_deq is not used.
Notes:
svn path=/head/; revision=117165
|
| |
|
|
| |
Notes:
svn path=/head/; revision=117162
|
| |
|
|
|
|
|
| |
use [signal number - 1] as subscript to access the array.
Notes:
svn path=/head/; revision=117066
|
| |
|
|
|
|
|
| |
triggered until LDT entry is exhausted.
Notes:
svn path=/head/; revision=117063
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
signals were changed in kernel, it will retrieve the pending set and
try to find a thread to dispatch the signal. The dispatching process
can be rolled back if the signal is no longer in kernel.
o Create two functions _thr_signal_init() and _thr_signal_deinit(),
all signal action settings are retrieved from kernel when threading
mode is turned on, after a fork(), child process will reset them to
user settings by calling _thr_signal_deinit(). when threading mode
is not turned on, all signal operations are direct past to kernel.
o When a thread generated a synchoronous signals and its context returned
from completed list, UTS will retrieve the signal from its mailbox and try
to deliver the signal to thread.
o Context signal mask is now only used when delivering signals, thread's
current signal mask is always the one in pthread structure.
o Remove have_signals field in pthread structure, replace it with
psf_valid in pthread_signal_frame. when psf_valid is true, in context
switch time, thread will backout itself from some mutex/condition
internal queues, then begin to process signals. when a thread is not
at blocked state and running, check_pending indicates there are signals
for the thread, after preempted and then resumed time, UTS will try to
deliver signals to the thread.
o At signal delivering time, not only pending signals in thread will be
scanned, process's pending signals will be scanned too.
o Change sigwait code a bit, remove field sigwait in pthread_wait_data,
replace it with oldsigmask in pthread structure, when a thread calls
sigwait(), its current signal mask is backuped to oldsigmask, and waitset
is copied to its signal mask and when the thread gets a signal in the
waitset range, its current signal mask is restored from oldsigmask,
these are done in atomic fashion.
o Two additional POSIX APIs are implemented, sigwaitinfo() and sigtimedwait().
o Signal code locking is better than previous, there is fewer race conditions.
o Temporary disable most of code in _kse_single_thread as it is not safe
after fork().
Notes:
svn path=/head/; revision=116977
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=116976
|
| |
|
|
|
|
|
|
|
|
| |
code until rtld-elf and libkse can cooperate better, those code can be
restored.
Reviewed by: deischen
Notes:
svn path=/head/; revision=116975
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=116974
|
| |
|
|
|
|
|
| |
Reviewed by: deischen
Notes:
svn path=/head/; revision=116973
|
| |
|
|
|
|
|
|
|
|
| |
was changed, it needs signal parameter, pass -1 to it, it indicates to
interrupt syscall.
Reviewed by: deischen
Notes:
svn path=/head/; revision=116972
|
| |
|
|
|
|
|
|
|
|
|
| |
platforms the compiler warns about incompatible integer/pointer casts
and on ia64 this generally is bad news. We know that what we're doing
here is valid/correct, so suppress the warning. No functional change.
Sleeps better: marcel
Notes:
svn path=/head/; revision=116773
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by moving the definition of struct ksd to pthread_md.h and removing
the inclusion of ksd.h from thr_private.h (which has the definition
of struct kse and kse_critical_t). This allows ksd.h to have inline
functions that use struct kse and kse_critical_t and generally
yields a cleaner implementation at the cost of not having all ksd
related types/definitions in one header.
Implement the ksd functionality on ia64 by using inline functions
and permanently remove ksd.c from the ia64 specific makefile.
This change does not clean up the i386 specific version of ksd.h.
NOTE: The ksd code on ia64 abuses the tp register in the same way
as it is abused in libthr in that it is incompatible with the
runtime specification. This will be address when support for TLS
hits the tree.
Notes:
svn path=/head/; revision=116771
|
| |
|
|
|
|
|
|
|
|
|
|
| |
_ksd_readandclear_tmbx to be function-like. That way we
can define them as inline functions or create prototypes
for them.
This change allows the ksd interface on ia64 to be fully
inlined.
Notes:
svn path=/head/; revision=116719
|
| |
|
|
| |
Notes:
svn path=/head/; revision=116514
|