diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-23 16:04:39 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-23 16:04:39 -0600 |
commit | bda6baf012802a5748bbec3f5d3d8fc0ea398245 (patch) | |
tree | 70a7246e73e685637d9320e19608cc6140c50ff8 /nuttx/sched/group | |
parent | f78a387b5ccea2d459a913b018c5a3fe1c24fac6 (diff) | |
download | px4-nuttx-bda6baf012802a5748bbec3f5d3d8fc0ea398245.tar.gz px4-nuttx-bda6baf012802a5748bbec3f5d3d8fc0ea398245.tar.bz2 px4-nuttx-bda6baf012802a5748bbec3f5d3d8fc0ea398245.zip |
Add support for a per-process virtual page allocator. This is a new member of the task_group_s structure. The allocaor must be initialized when a new user process is started and uninitialize when the process group is finally destroyed. It is used by shmat() and shmdt() to pick the virtual address onto which to map the shared physical memory.
Diffstat (limited to 'nuttx/sched/group')
-rw-r--r-- | nuttx/sched/group/group_leave.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nuttx/sched/group/group_leave.c b/nuttx/sched/group/group_leave.c index 6b44ba68a..7fadb31fc 100644 --- a/nuttx/sched/group/group_leave.c +++ b/nuttx/sched/group/group_leave.c @@ -204,10 +204,16 @@ static inline void group_release(FAR struct task_group_s *group) mq_release(group); #endif +#if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_MM_SHM) + /* Release any resource held by shared memory virtual page allocator */ + + (void)shm_group_release(group); +#endif + #ifdef CONFIG_ARCH_ADDRENV /* Destroy the group address environment */ - (void)up_addrenv_destroy(&group->addrenv); + (void)up_addrenv_destroy(&group->tg_addrenv); /* Mark no address environment */ |