diff --git a/include/nuttx/mm/shm.h b/include/nuttx/mm/shm.h index 0045b846b37..664c6e7843a 100644 --- a/include/nuttx/mm/shm.h +++ b/include/nuttx/mm/shm.h @@ -95,22 +95,6 @@ struct group_shm_s * Public Function Prototypes ****************************************************************************/ -/**************************************************************************** - * Name: shm_initialize - * - * Description: - * Perform one time, start-up initialization of the shared memory logic. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void shm_initialize(void); - /**************************************************************************** * Name: shm_group_initialize * diff --git a/mm/shm/shm_initialize.c b/mm/shm/shm_initialize.c index 9c5ad98aab2..1e49bcbe6e6 100644 --- a/mm/shm/shm_initialize.c +++ b/mm/shm/shm_initialize.c @@ -43,33 +43,15 @@ /* State of the all shared memory */ -struct shm_info_s g_shminfo; +struct shm_info_s g_shminfo = +{ + SEM_INITIALIZER(1) +}; /**************************************************************************** * Public Functions ****************************************************************************/ -/**************************************************************************** - * Name: shm_initialize - * - * Description: - * Perform one time, start-up initialization of the shared memory logic. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void shm_initialize(void) -{ - /* Initialize the shared memory region list */ - - nxsem_init(&g_shminfo.si_sem, 0, 1); -} - /**************************************************************************** * Name: shm_group_initialize * diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index c9e7c454f52..3fb1cbace8d 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -706,12 +705,6 @@ void nx_start(void) /* Setup for Multi-Tasking ************************************************/ -#ifdef CONFIG_MM_SHM - /* Initialize shared memory support */ - - shm_initialize(); -#endif - #ifndef CONFIG_BINFMT_DISABLE /* Initialize the binfmt system */