| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
I've skipped the GNU stuff for now. From Patrick Latifi.
|
|
|
|
|
|
|
| |
ITIMER_VIRTUAL for the profiled version. Fixes problems when programs
linked with libpthread try to use ITIMER_VIRTUAL (and have no way of
knowing that this will cause conflicts with the threads lib).
marc@ OK
|
| |
|
|
|
|
|
|
|
|
| |
non-thread-safe dl functions. Only enabled for ELF architectures
at this time as needed dlxxx support has not yet been added to the
a.out run time loader.
'doesn't break xmms at least' tedu@. Tested by others with no comment
|
| |
|
|
|
|
| |
This is easier than fixing the strcpy in the file.
|
| |
|
|
|
|
| |
Also, for safety lock the _thread_fd_table when removing entries.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
to notice that the file exists. This fixes a problem where an
application may think a file was in non-block mode because the
threads kernel played with the flags. Also fix a stupid error
introduced in the last commit -- the threaded version of dup and
dup2 were foobared. Bad marc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for dup-ed fds are shared to ensure proper flag handling. A refcnt
was added to control when entries should be freed. Specific changes:
close: don't free entry unless refcnt is zero
dup: rewrite to use new function _thread_fd_table_dup
dup2: rewrite to use new function _thread_fd_table_dup
fcntl: use _thread_fd_table_dup
uthread_fd: initialize thread fd table, searching for dup-ed fds. Add
function to share _thread_fd_table entries when an fd is dup-ed.
uthread_init: make it readable. Call fd init functions.
All current regression tests plus the mysql torture test pass. The
new stdfiles regression test fails (I/O redirection problem). Part
2 is intended to fix that problem
|
| |
|
|
|
|
|
| |
Clean up (compiler warning elimination). Compile check options added
but commented out as they have not been checked on all architectures, yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the thread regressions tests pass on i386, sparc, sparc64
(save the siginfo test on sparc64 due to a kernel issue) and alpha.
The tests should also pass on ppc.
In addition, it fixes the problems with the "mysql torture test"
provided by one of our users. The python port also appears to
work correctly with these changes.
Summary of changes:
* check_pending removed from thread structure, no longer used.
* unused elements of sigstatus structure removed. The sigstatus
structure is now used to keep track of siginfo data instead of
defining a local array in uthread_sig.c.
* _thread_kern_sched_sig removed
* _thread_sig_process goes away -- can't have a lock active when
signal handlers are called. Functions now call _thread_sig_handle
directly.
* _thread_clear_pending now used lib wide to clear pending flags.
It was named _clean_pending_flag and only used in uthread_sig.c.
The function clears both per thread signals, and per process signals.
* _thread_sig_handle now returns a value.
* unused debugging macros removed from the thread kernel
* dispatch pending signals after switching to a thread providing
that signal handling hasn't been deferred by the thread.
* process thread switchhooks before dispatching pending sigs
* check for thread cancellation before dispatching pending sigs
* re-wrote pthread-kill to do the correct thing. It now does
minimal thread-kill-specific processing and then calls the
existing code in uthread_sig to process the generated signal.
* shut the compiler up when compiling uthread_mutex.c
* no more "signal_lock". It does more harm than good.
* keep track of "per-process" signals.
* don't bother saving siginfo_t data for the scheduling signal.
* per posix: SIGSTOP cleared when SIGCONT received and vice versa.
* add _dispatch_signal to properly dispatch a signal to a thread.
It sets the appropriate signal mask, something that was missing
in the previous implementation. This fixes several bugs.
The previous method held a lock. If the signal handler longjmp-ed
the lock was never cleared and no more signals were processed.
|
|
|
|
|
|
|
|
|
|
|
| |
an arch/i386 patch previously commited and arch/sparc64 patches
from jason@ make the preemption_float test pass on those two
architectures.
Do not run signal handlers for a thread until the thread has
been made current, ensuring the proper context. Solves several
(if not all) of the '_pq_insert_tail: Already in priority queue'
problems.
|
| |
|
|
|
|
|
| |
This is necessary for alpha setjmp. The alpha setjmp/longjmp
regression tests pass with -pthread with this change
|
| |
|
|
|
|
|
|
| |
are both void.
The select call is a cancellation point per IEEE Std 1003.1-2001.
This should fix a problem espie@ found in kde.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
is created.
|
|
|
|
|
|
| |
in libc so static linking works with -lpthreads. There is a
(linker?) problem that still shows up with static -pthread, though.
Solution to problem from freebsd.
|
| |
|
|
|
|
| |
Thanks to miod@ for m68k and vax fixes
|
|
|
|
| |
not zero on all arches
|
| |
|
|
|
|
|
|
|
| |
alpha (millert@), i386 (marc@), m68k (millert@ and miod@),
powerpc (drahn@ and dhartmei@), sparc (millert@ and marc@),
sparc64 (marc@), and vax (millert@ and miod@).
Thanks to millert@, miod@, and mickey@ for fixes along the way.
|
| |
|
|
|
|
|
|
|
|
| |
missing) _thread_fd_unlock_owned function can be added with minimal pain.
The incorrect special handling of the stdio fds was also removed.
Tested with the libc_r regression tests and the mysql regression tests.
No complaints from any developers
|
|
|
|
|
|
|
| |
handling errors in the threads library. Most of the libc_r regression
tests are now ok. thread specific kill semantics are still not correct.
No negative comments after posting to tech@ a week or so ago.
siginfo test fails on sparc64 due to sparc64 oddity.
|
|
|
|
|
| |
a freebsd patch forwarded to me by millert@ (thanks!). Change also
applied to uthread_info.c even though we do not use it
|
|
|
|
|
| |
Part of the prep for SA_SIGINFO support. With this change the
new siginfo regression test will fail instead of loop on all arches.
|
| |
|
| |
|
|
|
|
| |
for pthread_rwlock_wrlock & sie says Single Unix Specification; ok fgs
|
|
|
|
| |
thread is already exiting, from archie@FreeBSD, ok fgs
|
| |
|
|
|
|
|
| |
Properly clear the status of a join operation if the joining thread is
canceled or the joinee is detached.
|
|
|
|
| |
a while ago by marc@ and brad@
|
| |
|
|
|
|
| |
Prevent dup2(2) from closing internal libc_r pipe descriptors.
|
| |
|
| |
|
|
|
|
|
|
|
| |
o Use _get_curthread() instead of _thread_run.
o Correctly deal with cancellations.
o Add libc internal versions of pthread_mutex_lock() and
pthread_mutex_trylock(), unused by now.
|