mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
With these fixes, the kernel build is basically functional (but there is more to be done)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5722 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -43,11 +43,9 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef CONFIG_NUTTX_KERNEL
|
||||
# include <stdlib.h>
|
||||
# include <nuttx/mm.h>
|
||||
#endif
|
||||
#include <nuttx/mm.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
@@ -77,10 +75,10 @@ extern "C"
|
||||
|
||||
#ifndef CONFIG_NUTTX_KERNEL
|
||||
|
||||
# define kmm_initialize(h,s) mm_initialize(&g_mmheap,h,s)
|
||||
# define kmm_addregion(h,s) mm_addregion(&g_mmheap,h,s)
|
||||
# define kmm_trysemaphore() mm_trysemaphore(&g_mmheap)
|
||||
# define kmm_givesemaphore() mm_givesemaphore(&g_mmheap)
|
||||
# define kmm_initialize(h,s) umm_initialize(h,s)
|
||||
# define kmm_addregion(h,s) umm_addregion(h,s)
|
||||
# define kmm_trysemaphore() umm_trysemaphore()
|
||||
# define kmm_givesemaphore() umm_givesemaphore()
|
||||
|
||||
# define kmalloc(s) malloc(s)
|
||||
# define kzalloc(s) zalloc(s)
|
||||
|
||||
@@ -238,6 +238,18 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR void *heap_start,
|
||||
void mm_addregion(FAR struct mm_heap_s *heap, FAR void *heapstart,
|
||||
size_t heapsize);
|
||||
|
||||
/* Functions contained in umm_initialize.c **********************************/
|
||||
|
||||
#if !defined(CONFIG_NUTTX_KERNEL) || !defined(__KERNEL__)
|
||||
void umm_initialize(FAR void *heap_start, size_t heap_size);
|
||||
#endif
|
||||
|
||||
/* Functions contained in umm_addregion.c ***********************************/
|
||||
|
||||
#if !defined(CONFIG_NUTTX_KERNEL) || !defined(__KERNEL__)
|
||||
void umm_addregion(FAR void *heapstart, size_t heapsize);
|
||||
#endif
|
||||
|
||||
/* Functions contained in mm_sem.c ******************************************/
|
||||
|
||||
void mm_seminitialize(FAR struct mm_heap_s *heap);
|
||||
@@ -245,6 +257,13 @@ void mm_takesemaphore(FAR struct mm_heap_s *heap);
|
||||
int mm_trysemaphore(FAR struct mm_heap_s *heap);
|
||||
void mm_givesemaphore(FAR struct mm_heap_s *heap);
|
||||
|
||||
/* Functions contained in umm_semaphore.c ***********************************/
|
||||
|
||||
#if !defined(CONFIG_NUTTX_KERNEL) || !defined(__KERNEL__)
|
||||
int umm_trysemaphore(void);
|
||||
void umm_givesemaphore(void);
|
||||
#endif
|
||||
|
||||
/* Functions contained in mm_malloc.c ***************************************/
|
||||
|
||||
#ifdef CONFIG_MM_MULTIHEAP
|
||||
|
||||
Reference in New Issue
Block a user