| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
in return value not in errno.
|
| |
|
|
|
|
|
|
|
|
| |
These files had tags after the copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).
Approved by: rwatson (mentor)
|
|
|
|
|
|
|
|
| |
semaphores. Also add cancellation cleanup handlers to keep semaphores
in a consistent state.
Submitted in part by: davidxu
Reviewed by: davidxu
|
| |
|
|
|
|
| |
points to sem_wait() and sem_timedwait(). Also make sem_post signal-safe.
|
|
|
|
|
| |
compatibility link from libc_r to libpthread (previously a link
from libc_r to libkse).
|
|
|
|
|
|
|
|
|
|
|
| |
thread library for i386, amd64, and ia64. For alpha
and sparc64 the library is not changed and remains libkse,
and links are installed so that libpthread -> libc_r.
The gcc -pthread option will be changed in a separate
commit so that it links to -lpthread instead of -lc_r.
Approved by: re@
|
|
|
|
|
|
| |
unlock the mutex, old code confuses some programs when it returns EINVAL.
Noticed by: bland
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
enable sigaltstack for scope system thread.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
is supported, for scope system process, kernel signal bits need to be
changed.
Reviewed by: deischen
Tested on : i386 amd64 ia64
|
| |
|
|
|
|
| |
new fork() wrapper.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
avoids signal to be blocked when otherwise it can be handled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_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
|
| |
|
|
|
|
|
|
|
| |
locks for [libc] spinlock implementation. This was previously backed
out because it exposed a bug in ia64 implementation.
OK'd by: marcel
|
|
|
|
|
|
|
|
|
| |
flags. We now create asynchronous contexts or syscall contexts only.
Syscall contexts differ from the minimal ABI dictated contexts by
having the scratch registers saved and restored because that's where
we keep the syscall arguments and syscall return values.
Since this change affects KSE, have it use kse_switchin(2) for the
"new" syscall context.
|
|
|
|
|
|
|
|
|
|
|
| |
UTS with the stack correctly aligned. Also, while here, use an indirect
jump rather than the pushq/ret hack.
This fixes threaded apps that use floating point for me, although
it hasn't solved all the problems. It is an improvement though.
Preservation of the 128 byte red zone hasn't been resolved yet.
Approved by: re (scottl)
|
|
|
|
|
|
| |
helps branch predict a lot for INTEL P4.
Approved by: re (scottl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
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
|
| |
|