sched/addrenv: Miscellaneous clean-up and fixes

- Remove the temporary "saved" variable when temporarily changing MMU
  mappings to access another process's memory. The fact that it has an
  address environment is enough to make the choice
- Restore nxflat_addrenv_restore-macro. It was accidentally lost when
  the address environment handling was re-factored.
This commit is contained in:
Ville Juven
2023-04-13 13:37:20 +03:00
committed by Masayuki Ishikawa
parent 869aee6a78
commit b982c1747b
4 changed files with 22 additions and 13 deletions

View File

@@ -79,6 +79,25 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo,
# define nxflat_addrenv_select(l) addrenv_select(&(l)->addrenv)
#endif
/****************************************************************************
* Name: nxflat_addrenv_restore
*
* Description:
* Restore the address environment before nxflat_addrenv_select() was
* called..
*
* Input Parameters:
* loadinfo - Load state information
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
#ifdef CONFIG_ARCH_ADDRENV
# define nxflat_addrenv_restore(l) addrenv_restore()
#endif
/****************************************************************************
* Name: nxflat_addrenv_free
*