version 1.41, 2011/06/20 05:50:39 |
version 1.41.6.1, 2012/06/02 11:09:06 |
Line 187 cpu_getmcontext(struct lwp *l, mcontext_ |
|
Line 187 cpu_getmcontext(struct lwp *l, mcontext_ |
|
} |
} |
|
|
int |
int |
|
cpu_mcontext_validate(struct lwp *l, const mcontext_t *mcp) |
|
{ |
|
return 0; |
|
} |
|
|
|
int |
cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags) |
cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags) |
{ |
{ |
struct trapframe * const tf = l->l_md.md_utf; |
struct trapframe * const tf = l->l_md.md_utf; |
const __greg_t * const gr = mcp->__gregs; |
const __greg_t * const gr = mcp->__gregs; |
|
int error; |
|
|
/* Restore GPR context, if any. */ |
/* Restore GPR context, if any. */ |
if (flags & _UC_CPU) { |
if (flags & _UC_CPU) { |
|
error = cpu_mcontext_validate(l, mcp); |
|
if (error) |
|
return error; |
|
|
#ifdef PPC_HAVE_FPU |
#ifdef PPC_HAVE_FPU |
/* |
/* |
* Always save the FP exception mode in the PCB. |
* Always save the FP exception mode in the PCB. |