Date: Thu, 07 Jun 2001 19:16:57 +0200 From: Stefan Hoffmeister <Stefan.Hoffmeister@Econos.de> To: Daniel Eischen <eischen@vigrid.com> Cc: Stefan Hoffmeister <freebsd-ml@Econos.de>, freebsd-hackers@FreeBSD.ORG Subject: Re: libc_r, signal handler ucontext modification Message-ID: <4bdvhtgru1j77uvphko0dsg8ohpj8beloh@4ax.com> In-Reply-To: <Pine.SUN.3.91.1010607115002.18858A-100000@pcnet1.pcnet.com> References: <if4vht0v8dlrc51kuokta0cs0r5p7flef9@4ax.com> <Pine.SUN.3.91.1010607115002.18858A-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
: On Thu, 7 Jun 2001 12:07:50 -0400 (EDT), Daniel Eischen wrote: >On Thu, 7 Jun 2001, Stefan Hoffmeister wrote: >> [copy context back into thread] >You can't do that. There is no requirement that the interrupted thread >is the one that handles the signal. If you copy the context back to >the current threads context storage, then you'll possibly end up with >2 threads running (or trying to run) on the same stack! Ouch :-) >You could also easily modify the context and do a >sigreturn(ucp) on it to achieve the same effect (being careful to make >sure you're not trying to jump to another threads context). This sounds very good, indeed. I do not want to make a context switch; essentially all I care about is that * the changed value of EIP is taken * ESP (from context) is retained * Changed values of EAX, EDX are taken AFA sigreturn is concerned: libc_r.so (!) does not export it; it only exports _thread_sys_sigreturn. Is there some kind of "__strong_reference" missing? In a slightly daring move, I am calling _thread_sys_sigreturn and, in my trivial test scenario, this seems to work - now I wonder whether it is supposed to work? IOW, is _thread_sys_sigreturn an alias for sigreturn in libc_r.so? Thanks very much, Stefan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4bdvhtgru1j77uvphko0dsg8ohpj8beloh>