| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
locks until we know why this breaks ia64.
Reported by: marcel
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reviewed by: deischen
|
|
|
|
| |
Reviewed by: bde
|
|
|
|
| |
Noticed by: bde
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
locks.
Reviewed by: davidxu
|
|
|
|
|
|
| |
internal lock, not a pthread spinlock).
Reviewed by: davidxu
|
|
|
|
| |
Add a blank line after a variable declaration.
|
|
|
|
|
| |
begin with underscores and provide weak definitions without
underscores. Make the pthread spinlock conform to this convention.
|
|
|
|
|
|
| |
API).
Reviewed by: davidxu
|
| |
|
| |
|
|
|
|
|
|
|
| |
about the fpu code here. It should be using fxsave/fxrstor instead of
saving/restoring the control word. The SSE registers are used a lot in
gcc generated code on amd64. I'm not sure how this all fits together
though.
|
| |
|
|
|
|
|
| |
The first argument is the UTS function, the second argument is the
first argument to the UTS function. Who's on first.
|
|
|
|
|
| |
return 0 when called the first time, and return 1 when resumed by
thr_setcontext().
|
|
|
|
|
|
|
|
| |
yet work, but hopefully someone familiar with the sparc64
port can pick up the reins.
Submitted by: jake
With mods by: deischen
|
| |
|
|
|
|
|
|
|
| |
thread state is changed from RUNNING to WAIT state and do some cancellation
operations for every cancellable state.
Reviewed by: deischen
|
|
|
|
|
|
| |
for all wrapped syscalls under SMP.
Reviewed by: deischen
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
was not proper English)
PR: docs/57434
Approved: blackend (mentor)
Reviewed by: deischen
|
| |
|
|
|
|
|
|
| |
threads are still referencing the kse by migrating them to initial kse.
Reviewed by: deischen
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
On ia64, where there's no libc_r at all, libkse is now the default
thread library by virtue of these links.
The reasons for this change are:
1. libkse is slated to become the default thread library anyway,
2. active development and maintenance is only present for libkse,
3. GNOME and KDE, both in the process of being supported on ia64,
work better with KSE; even on ia64.
|
| |
|
| |
|
|
|
|
| |
Reviewed by: deischen
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
THR_SETCONTEXT as PANIC(). The THR_SETCONTEXT macro is currently not
used, which means that the definition we had could be wrong, overly
pessimistic or unknowingly right. I don't like the odds...
The new _ia64_break_setcontext() and corresponding kernel fixes make
KSE mostly usable. There's still a case where we don't properly
restore a context and end up with a NaT consumption fault (typically
an indication for not handling NaT collection points correctly),
but at least now mutex_d works...
|
|
|
|
|
| |
Instead use the break instruction with an immediate specially
created for us.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
state for amd64 was twice as large as necessary. Peter
recently fixed this, so the comment no longer applies.
Also, since the size of struct mcontext changed, adjust
the threads library version of get&set context to match.
FYI, any change layout/size change to any arch's struct
mcontext will likely need some minor changes in libpthread.
|
|
|
|
| |
SIG_CANTMASK to remove unmaskable signal masks.
|
|
|
|
| |
it will be inherited in pthread_create.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
invoke signal handler.
Reviewed by: deischen
|
|
|
|
|
|
|
|
|
| |
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
|