summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/uthread_sig.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix for pr# 3179 and 3238. Patch verified by author of 3179.marc2003-04-301-3/+7
|
* Create a siginfo_t for thread-to-thread kill.marc2003-01-311-5/+10
| | | | | Clean up (compiler warning elimination). Compile check options added but commented out as they have not been checked on all architectures, yet.
* pthreads signal handling improvements. With these changes allmarc2003-01-271-137/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* save and restore fp state when switching threads. This, withmarc2003-01-241-25/+14
| | | | | | | | | | | 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.
* kill two compiler warnings; ok marc@todd2002-11-081-4/+6
|
* Include string.h to get memcpy() prototype; OK marc@millert2002-11-021-1/+2
|
* signal handling changes. This corrects several signalmarc2002-10-301-142/+158
| | | | | | | 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.
* handle the SA_RESETHAND flag.marc2002-10-071-2/+10
| | | | | Part of the prep for SA_SIGINFO support. With this change the new siginfo regression test will fail instead of loop on all arches.
* More changes from FreeBSD, including:fgsch2001-12-311-4/+8
| | | | | | | | | o Only poll file descriptors when needed. o Change the way timing is achieved, counting scheduling ticks instead of calculating the elapsed time via gettimeofday(). o Prevent an overflow when polling. o Use curthread instead of _thread_run. o Remove extra spaces; indent.
* Allow the scheduler to return to the signal handler and the signalmarc2001-12-181-6/+12
| | | | | | handler to return instead of calling sigreturn directly. This works around an apparent bug in sparc sigreturn handling. ok fgs@ and noone else has bitched
* Don't change the state of a thread as a result of a signal that ismarc2001-11-051-4/+7
| | | | | masked by that thread. This fixes the problem found with the signal regression test.
* Fix signal dispatching. No-one has reported any probs (other thanmarc2001-11-021-3/+3
| | | | | with regression tests that need to be fixed) and fgs@ thinks it's OK. I'll look at the pthreads regression tests, next
* Start syncing with FreeBSD:fgsch2001-08-211-13/+16
| | | | | | | | | | o Implement _get_curthread() and _set_curthread(). Use it where possible. o Add missing _thread_[enter|leave]_cancellation_point(). o Add a couple of not yet used vars to pthread_private.h. o Remove return's from void functions. This is by no means complete, but instead of doing a big commit, i'll split it in small ones, minimizing diffs.
* fill out cases with new thread statesd2000-01-061-2/+3
|
* sync with FreeBSDd1999-11-251-101/+122
|
* sync with FreeBSDd1999-05-261-13/+40
|
* identd1999-01-061-0/+1
|
* use md spinlock; signal statisticsd1998-12-211-1/+8
|
* sync with FreeBSD (rwlock, gc thread, man pages)d1998-11-091-44/+17
| | | | | | | add (broken) mips md stuff fix some const warnings add sigaltstack() stub another hash at getting shlib auto-init to work (mips/elf and i386/a.out)
* experimental threaded libc - kernel onlyd1998-08-271-0/+362