1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Save and restore thread's error code around signal handling.

Reviewed by: deischen
This commit is contained in:
David Xu 2003-07-09 01:06:12 +00:00
parent fb88a3e0f4
commit 0527fc8806
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117344
2 changed files with 4 additions and 2 deletions

View File

@ -1036,7 +1036,7 @@ thr_resume_wrapper(int sig, siginfo_t *siginfo, ucontext_t *ucp)
{
struct pthread *curthread = _get_curthread();
struct kse *curkse;
int ret;
int ret, err_save = curthread->error;
DBG_MSG(">>> sig wrapper\n");
if (curthread->lock_switch)
@ -1045,6 +1045,7 @@ thr_resume_wrapper(int sig, siginfo_t *siginfo, ucontext_t *ucp)
_kse_critical_enter();
curkse = _get_curkse();
curthread->tmbx.tm_context = *ucp;
curthread->error = err_save;
ret = _thread_switch(&curthread->tmbx, &curkse->k_mbx.km_curthread);
if (ret != 0)
PANIC("thr_resume_wrapper: thread has returned "

View File

@ -1036,7 +1036,7 @@ thr_resume_wrapper(int sig, siginfo_t *siginfo, ucontext_t *ucp)
{
struct pthread *curthread = _get_curthread();
struct kse *curkse;
int ret;
int ret, err_save = curthread->error;
DBG_MSG(">>> sig wrapper\n");
if (curthread->lock_switch)
@ -1045,6 +1045,7 @@ thr_resume_wrapper(int sig, siginfo_t *siginfo, ucontext_t *ucp)
_kse_critical_enter();
curkse = _get_curkse();
curthread->tmbx.tm_context = *ucp;
curthread->error = err_save;
ret = _thread_switch(&curthread->tmbx, &curkse->k_mbx.km_curthread);
if (ret != 0)
PANIC("thr_resume_wrapper: thread has returned "