mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
arch/mips/src/mips32/up_vfork.c: Fix a copy-paste error. On vfork, the GP register was being set to the new SP value vs. the context GP value. NOTED in Bitbucket issue 155.
This commit is contained in:
@@ -251,7 +251,7 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
#endif
|
||||
child->cmn.xcp.regs[REG_SP] = newsp; /* Stack pointer */
|
||||
#ifdef MIPS32_SAVE_GP
|
||||
child->cmn.xcp.regs[REG_GP] = newsp; /* Global pointer */
|
||||
child->cmn.xcp.regs[REG_GP] = context->gp; /* Global pointer */
|
||||
#endif
|
||||
|
||||
/* And, finally, start the child task. On a failure, nxtask_vforkstart()
|
||||
|
||||
Reference in New Issue
Block a user