mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
group/group_addrenv: Move address environment from group -> tcb
Detach the address environment handling from the group structure to the tcb. This is preparation to fix rare cases where the system (MMU) is left without a valid page directory, e.g. when a process exits.
This commit is contained in:
@@ -239,18 +239,14 @@ int exec_module(FAR const struct binary_s *binp,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
/* Assign the address environment to the new task group */
|
||||
/* Attach the address environment to the new task */
|
||||
|
||||
ret = up_addrenv_clone(&binp->addrenv, &tcb->cmn.group->tg_addrenv);
|
||||
ret = addrenv_attach((FAR struct tcb_s *)tcb, &binp->addrenv);
|
||||
if (ret < 0)
|
||||
{
|
||||
berr("ERROR: up_addrenv_clone() failed: %d\n", ret);
|
||||
berr("ERROR: addrenv_attach() failed: %d\n", ret);
|
||||
goto errout_with_tcbinit;
|
||||
}
|
||||
|
||||
/* Mark that this group has an address environment */
|
||||
|
||||
tcb->cmn.group->tg_flags |= GROUP_FLAG_ADDRENV;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BINFMT_CONSTRUCTORS
|
||||
|
||||
Reference in New Issue
Block a user