summaryrefslogtreecommitdiff
path: root/nuttx/mm
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-02 11:22:09 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-02 11:22:09 -0600
commit70364682c1d59b7ac26548085cc8faa835086c02 (patch)
tree9d6b1584b65ed5dbc7896ad55d677c3540fdc115 /nuttx/mm
parent0c224f7e3dd878868fe921a5b41efe2362ce7fb6 (diff)
downloadpx4-nuttx-70364682c1d59b7ac26548085cc8faa835086c02.tar.gz
px4-nuttx-70364682c1d59b7ac26548085cc8faa835086c02.tar.bz2
px4-nuttx-70364682c1d59b7ac26548085cc8faa835086c02.zip
Restructuring of build to allow use of use-space allocators by kernel logic in the kernel build.
Diffstat (limited to 'nuttx/mm')
-rwxr-xr-xnuttx/mm/kmm_sbrk.c5
-rw-r--r--nuttx/mm/mm_sbrk.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/mm/kmm_sbrk.c b/nuttx/mm/kmm_sbrk.c
index 09da8d93d..547dba047 100755
--- a/nuttx/mm/kmm_sbrk.c
+++ b/nuttx/mm/kmm_sbrk.c
@@ -41,7 +41,8 @@
#include <nuttx/mm.h>
-#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_ARCH_ADDRENV)
+#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_ARCH_ADDRENV) && \
+ defined(CONFIG_MM_PGALLOC) && defined(CONFIG_ARCH_USE_MMU)
/****************************************************************************
* Pre-processor Definitions
@@ -88,4 +89,4 @@ FAR void *kmm_sbrk(intptr_t incr)
return mm_sbrk(&g_kmmheap, incr, UINTPTR_MAX);
}
-#endif /* CONFIG_MM_USER_HEAP && CONFIG_ARCH_ADDRENV */
+#endif /* CONFIG_MM_KERNEL_HEAP && CONFIG_ARCH_ADDRENV && ... */
diff --git a/nuttx/mm/mm_sbrk.c b/nuttx/mm/mm_sbrk.c
index f8c22b33a..28689b3ca 100644
--- a/nuttx/mm/mm_sbrk.c
+++ b/nuttx/mm/mm_sbrk.c
@@ -47,7 +47,8 @@
#include <nuttx/mm.h>
#include <nuttx/pgalloc.h>
-#ifdef CONFIG_ARCH_ADDRENV
+#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_MM_PGALLOC) && \
+ defined(CONFIG_ARCH_USE_MMU)
/****************************************************************************
* Pre-processor Definitions
@@ -163,4 +164,4 @@ errout:
set_errno(err);
return (FAR void *)-1;
}
-#endif /* CONFIG_ARCH_ADDRENV */
+#endif /* CONFIG_ARCH_ADDRENV && CONFIG_MM_PGALLOC && CONFIG_ARCH_USE_MMU */