mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Fix several compile errors for logic added for CONFIG_BUILD_KERNEL, but which cause problems for other configurations
This commit is contained in:
+3
-3
@@ -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 */
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+8
-3
@@ -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 */
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/************************************************************************
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user