diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-03 09:21:59 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-03 09:21:59 -0600 |
commit | 08295bf5241e4f81907cbfc23e02cc8100d77f4c (patch) | |
tree | f64d1497adbf79f6169498cd29679a1b4c2aebc1 /nuttx | |
parent | 459a7e910f304a28e7fcfd72ac4e6e8fe1186c81 (diff) | |
download | nuttx-08295bf5241e4f81907cbfc23e02cc8100d77f4c.tar.gz nuttx-08295bf5241e4f81907cbfc23e02cc8100d77f4c.tar.bz2 nuttx-08295bf5241e4f81907cbfc23e02cc8100d77f4c.zip |
Fix several compile errors for logic added for CONFIG_BUILD_KERNEL, but which cause problems for other configurations
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/include/nuttx/mm.h | 6 | ||||
-rw-r--r-- | nuttx/mm/umm_addregion.c | 6 | ||||
-rw-r--r-- | nuttx/mm/umm_brkaddr.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_calloc.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_extend.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_free.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_initialize.c | 11 | ||||
-rw-r--r-- | nuttx/mm/umm_mallinfo.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_malloc.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_memalign.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_realloc.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_sbrk.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_sem.c | 2 | ||||
-rw-r--r-- | nuttx/mm/umm_zalloc.c | 2 |
14 files changed, 25 insertions, 20 deletions
diff --git a/nuttx/include/nuttx/mm.h b/nuttx/include/nuttx/mm.h index 6d9d8daa6..95fe2790c 100644 --- a/nuttx/include/nuttx/mm.h +++ b/nuttx/include/nuttx/mm.h @@ -262,8 +262,8 @@ extern "C" #define EXTERN extern #endif -#if (!defined(CONFIG_ARCH_ADDRENV) || !defined(CONFIG_BUILD_KERNEL)) && \ - (defined(CONFIG_BUILD_KERNEL) && !defined(__KERNEL__)) +#if (!defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL)) || \ + (defined(CONFIG_BUILD_DEFINED) && !defined(__KERNEL__)) /* User heap structure: * * - Flat build: In the FLAT build, the user heap structure is a globally @@ -272,7 +272,7 @@ extern "C" * in user space. * - Kernel build: There are multiple heaps, one per process. The heap * structure is associated with the address environment and there is - * no global user heap structure. + * no global user heap structure. */ EXTERN struct mm_heap_s g_mmheap; diff --git a/nuttx/mm/umm_addregion.c b/nuttx/mm/umm_addregion.c index 7710f2aa0..22a03cb8a 100644 --- a/nuttx/mm/umm_addregion.c +++ b/nuttx/mm/umm_addregion.c @@ -41,7 +41,7 @@ #include <nuttx/mm.h> -#ifdef MM_KERNEL_USRHEAP_INTF +#ifdef MM_KERNEL_USRHEAP_INIT /************************************************************************ * Pre-processor definition @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /************************************************************************ @@ -102,4 +102,4 @@ void umm_addregion(FAR void *heap_start, size_t heap_size) mm_addregion(USR_HEAP, heap_start, heap_size); } -#endif /* MM_KERNEL_USRHEAP_INTF */ +#endif /* MM_KERNEL_USRHEAP_INIT */ diff --git a/nuttx/mm/umm_brkaddr.c b/nuttx/mm/umm_brkaddr.c index ae1fc1c2f..6381d368b 100644 --- a/nuttx/mm/umm_brkaddr.c +++ b/nuttx/mm/umm_brkaddr.c @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_calloc.c b/nuttx/mm/umm_calloc.c index 665720947..0009b5a1f 100644 --- a/nuttx/mm/umm_calloc.c +++ b/nuttx/mm/umm_calloc.c @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_extend.c b/nuttx/mm/umm_extend.c index 9e9f2c63e..f8edc9ef6 100644 --- a/nuttx/mm/umm_extend.c +++ b/nuttx/mm/umm_extend.c @@ -59,7 +59,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_free.c b/nuttx/mm/umm_free.c index 6d1cd6bc6..d26d7ba11 100644 --- a/nuttx/mm/umm_free.c +++ b/nuttx/mm/umm_free.c @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_initialize.c b/nuttx/mm/umm_initialize.c index 3fdda2dde..5b926504d 100644 --- a/nuttx/mm/umm_initialize.c +++ b/nuttx/mm/umm_initialize.c @@ -39,9 +39,11 @@ #include <nuttx/config.h> +#include <assert.h> + #include <nuttx/mm.h> -#ifdef MM_KERNEL_USRHEAP_INTF +#ifdef MM_KERNEL_USRHEAP_INIT /************************************************************************ * Pre-processor definition @@ -70,7 +72,7 @@ /* Otherwise, the user heap data structures are in common .bss */ struct mm_heap_s g_mmheap; -#define USR_HEAP &g_mmheap; +#define USR_HEAP &g_mmheap #endif /************************************************************************ @@ -100,8 +102,11 @@ struct mm_heap_s g_mmheap; void umm_initialize(FAR void *heap_start, size_t heap_size) { +#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL) DEBUGASSERT(ARCH_DATA_RESERVE_SIZE >= sizeof(struct addrenv_reserve_s)); +#endif + mm_initialize(USR_HEAP, heap_start, heap_size); } -#endif /* MM_KERNEL_USRHEAP_INTF */ +#endif /* MM_KERNEL_USRHEAP_INIT */ diff --git a/nuttx/mm/umm_mallinfo.c b/nuttx/mm/umm_mallinfo.c index 2ccee5973..447269f00 100644 --- a/nuttx/mm/umm_mallinfo.c +++ b/nuttx/mm/umm_mallinfo.c @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_malloc.c b/nuttx/mm/umm_malloc.c index 6d99e75ab..fd4fe9608 100644 --- a/nuttx/mm/umm_malloc.c +++ b/nuttx/mm/umm_malloc.c @@ -62,7 +62,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_memalign.c b/nuttx/mm/umm_memalign.c index 4a13bfe91..51b0f923c 100644 --- a/nuttx/mm/umm_memalign.c +++ b/nuttx/mm/umm_memalign.c @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_realloc.c b/nuttx/mm/umm_realloc.c index 0652b172a..344d24d68 100644 --- a/nuttx/mm/umm_realloc.c +++ b/nuttx/mm/umm_realloc.c @@ -61,7 +61,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_sbrk.c b/nuttx/mm/umm_sbrk.c index 3266b09b9..349c61b86 100644 --- a/nuttx/mm/umm_sbrk.c +++ b/nuttx/mm/umm_sbrk.c @@ -65,7 +65,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** diff --git a/nuttx/mm/umm_sem.c b/nuttx/mm/umm_sem.c index 98997f461..8e899994b 100644 --- a/nuttx/mm/umm_sem.c +++ b/nuttx/mm/umm_sem.c @@ -59,7 +59,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /************************************************************************ diff --git a/nuttx/mm/umm_zalloc.c b/nuttx/mm/umm_zalloc.c index ebe232e22..20a37c2e2 100644 --- a/nuttx/mm/umm_zalloc.c +++ b/nuttx/mm/umm_zalloc.c @@ -62,7 +62,7 @@ #else /* Otherwise, the user heap data structures are in common .bss */ -# define USR_HEAP &g_mmheap; +# define USR_HEAP &g_mmheap #endif /**************************************************************************** |