Age | Commit message (Collapse) | Author |
|
|
|
Access to the global _res structure replaced by pointers to a
per thread instance. If unthreaded the pointer is to the
global structure.
Also replaced a 64k stack array with malloc-ed memory so
threaded aps (with a default 64k stack) have a chance at working.
ok deraadt@
|
|
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.
|
|
half-sized areas. fixes preemption_float on powerpc.
|
|
|
|
If the fpu isn't enabled, don't save state, otherwise, save the state,
mark both sides clean and disable the fpu.
On restore:
If the saved fpu state has the fpu disabled, do nothing, otherwise, restore
everything.
|
|
|
|
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.
|
|
|
|
ok millert@
|
|
|
|
|
|
ok deraadt@
|
|
== ENOBUFS, there is no point and it hurts chroot'ed processes.
Don't return immediately from syslog_r() when the send(), we may
have more work to do.
deraadt@ OK
|
|
|
|
|
|
This is necessary for alpha setjmp. The alpha setjmp/longjmp
regression tests pass with -pthread with this change
|
|
|
|
the sources have been moved (with history) to /usr/src/lib/libpthread
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
otherwise, fix it
|
|
|
|
|
|
|
|
|
|
takes their place. The -pthread option to gcc uses libpthread.
ppc portion of patch from drahn@ (thanks). gcc portions of patch
OK espie@. Ports testing (no bad effects!) by naddy@
best build sequence is: build gcc, build system, build ports
remove /usr/lib/lib{c_r,npthread}.*. Note, once libc_r and
libnpthread is removed threaded ports will stop working until
they have been re-built using the libpthread and the updated gcc.
That's why the above build sequence is recommended.
|
|
Also fix a signed vs. unsigned issue while I am at it.
Found by Jim Geovedi. OK deraadt@
|
|
doesn't blow up. This is a hack but is better than compiling sha1.c
with -O0 on sparc64. From NetBSD (mrg).
deraadt@ OK
|
|
this file...
|
|
|
|
Fixes - oh what a surprise - bus errors in awk.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
can link against libc without unresolved symbols again.
Anyone who correctly guessed that my m88k hard drive has been recovered,
wins a strawberry lollipop.
|
|
pollution. Conforming to art@'s evil plans.
|
|
|
|
OK miod@
|