: On Thu, 07 Jun 2001 15:21:31 +0200, Stefan Hoffmeister wrote:
>I admit that all this is somewhat anecdotal, but I haven't looked in
>detail yet at what happens after the signal handler has returned to
>
> uthread/uthread_sig.c -> _thread_sig_wrapper
Looking at code in question, I wonder whether in uthread_sig.c this code:
*********************************
static void
thread_sigframe_add(pthread_t thread, int sig, int has_args)
{
...
if (has_args) {
/* Copy the signal handler arguments to the signal frame: */
memcpy(&psf->uc, &_thread_sigq[psf->signo - 1].uc,
sizeof(psf->uc));
memcpy(&psf->siginfo, &_thread_sigq[psf->signo - 1].siginfo,
sizeof(psf->siginfo));
}
...
*********************************
should get matching code
*********************************
void
_thread_sigframe_restore(pthread_t thread, struct pthread_signal_frame
*psf)
{
thread->ctxtype = psf->ctxtype;
- memcpy(&thread->ctx.uc, &psf->ctx.uc, sizeof(thread->ctx.uc));
+ if (psf->sig_has_args)
+ memcpy(&thread->ctx.uc, &psf->uc, sizeof(thread->ctx.uc));
+ else
+ memcpy(&thread->ctx.uc, &psf->ctx.uc, sizeof(thread->ctx.uc));
*********************************
or something like that.
The above is completely untested, based on five minutes of staring at the
code, not even compiled, and I have no idea what I am doing :-)
Thoughts?
TIA,
Stefan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message