kernel: fix case of EAX getting clobbered after sigreturn.
This commit is contained in:
parent
13be76efe5
commit
c0074d3aa9
3 changed files with 6 additions and 1 deletions
|
@ -612,7 +612,9 @@ PUBLIC void delivermsg(struct proc *rp)
|
|||
r = OK;
|
||||
}
|
||||
|
||||
rp->p_reg.retreg = r;
|
||||
if(!(rp->p_misc_flags & MF_CONTEXT_SET)) {
|
||||
rp->p_reg.retreg = r;
|
||||
}
|
||||
}
|
||||
|
||||
PRIVATE char *flagstr(u32_t e, const int dir)
|
||||
|
|
|
@ -224,6 +224,7 @@ struct proc {
|
|||
#define MF_FPU_INITIALIZED 0x1000 /* process already used math, so fpu
|
||||
* regs are significant (initialized)*/
|
||||
#define MF_SENDING_FROM_KERNEL 0x2000 /* message of this process is from kernel */
|
||||
#define MF_CONTEXT_SET 0x4000 /* don't touch context */
|
||||
|
||||
/* Magic process table addresses. */
|
||||
#define BEG_PROC_ADDR (&proc[0])
|
||||
|
|
|
@ -65,6 +65,8 @@ PUBLIC int do_sigreturn(struct proc * caller, message * m_ptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
rp->p_misc_flags |= MF_CONTEXT_SET;
|
||||
|
||||
return(OK);
|
||||
}
|
||||
#endif /* USE_SIGRETURN */
|
||||
|
|
Loading…
Reference in a new issue