summaryrefslogtreecommitdiff
path: root/nuttx/mm
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-03 09:21:59 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-03 09:21:59 -0600
commit08295bf5241e4f81907cbfc23e02cc8100d77f4c (patch)
treef64d1497adbf79f6169498cd29679a1b4c2aebc1 /nuttx/mm
parent459a7e910f304a28e7fcfd72ac4e6e8fe1186c81 (diff)
downloadnuttx-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/mm')
-rw-r--r--nuttx/mm/umm_addregion.c6
-rw-r--r--nuttx/mm/umm_brkaddr.c2
-rw-r--r--nuttx/mm/umm_calloc.c2
-rw-r--r--nuttx/mm/umm_extend.c2
-rw-r--r--nuttx/mm/umm_free.c2
-rw-r--r--nuttx/mm/umm_initialize.c11
-rw-r--r--nuttx/mm/umm_mallinfo.c2
-rw-r--r--nuttx/mm/umm_malloc.c2
-rw-r--r--nuttx/mm/umm_memalign.c2
-rw-r--r--nuttx/mm/umm_realloc.c2
-rw-r--r--nuttx/mm/umm_sbrk.c2
-rw-r--r--nuttx/mm/umm_sem.c2
-rw-r--r--nuttx/mm/umm_zalloc.c2
13 files changed, 22 insertions, 17 deletions
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
/****************************************************************************