Restructuring of build to allow use of use-space allocators by kernel logic in the kernel build.

This commit is contained in:
Gregory Nutt
2014-09-02 11:22:09 -06:00
parent 8557f1a1bb
commit aa7efbb52e
2 changed files with 10 additions and 10 deletions
+3 -2
View File
@@ -67,8 +67,9 @@
* *
* The ARMv7 has no MPU but does have an MMU. With this MMU, it can support * The ARMv7 has no MPU but does have an MMU. With this MMU, it can support
* the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there * the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there
* is again only one heap but, retaining the terminology, this is the kernel * is one kernel heap but multiple user heaps: One per task group. However,
* heap. * in this case, we need only be concerned about initializing the single
* kernel heap here.
*/ */
/**************************************************************************** /****************************************************************************
+7 -8
View File
@@ -69,13 +69,12 @@
* *
* The ARMv7 has no MPU but does have an MMU. With this MMU, it can support * The ARMv7 has no MPU but does have an MMU. With this MMU, it can support
* the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there * the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there
* is again only one heap but, retaining the terminology, this is the kernel * is one kernel heap but multiple user heaps: One per task group. However,
* heap. * in this case, we need only be concerned about initializing the single
* kernel heap here.
*/ */
#if defined(CONFIG_MM_USER_HEAP) && defined(CONFIG_MM_KERNEL_HEAP) #if defined(CONFIG_BUILD_KERNEL)
# error "Cannot support both user and kernel heaps"
#elif defined(CONFIG_MM_KERNEL_HEAP)
# define MM_ADDREGION kmm_addregion # define MM_ADDREGION kmm_addregion
#else #else
# define MM_ADDREGION umm_addregion # define MM_ADDREGION umm_addregion
@@ -247,10 +246,10 @@
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_MM_USER_HEAP) #if defined(CONFIG_BUILD_KERNEL)
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
#elif defined(CONFIG_MM_KERNEL_HEAP)
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size) void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
#else
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
#endif #endif
{ {
#if defined(CONFIG_BOOT_SDRAM_DATA) #if defined(CONFIG_BOOT_SDRAM_DATA)