mm/mm_heap: fix mm_heap not support BUILD_FLAT

1. change ifdef __KERNEL__ to:
   if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)

2. change mm_delaylist to *mm_delaylist

3. change FAR struct mm_delaynode_s *new to:
   FAR struct mm_delaynode_s *tmp

4. should check mm_trysemaphore() return values

Change-Id: I57ba991f13c3eaf56dc2d71ac946c11669e32dfa
Signed-off-by: ligd <liguiding@fishsemi.com>
This commit is contained in:
ligd
2020-04-10 12:32:32 +08:00
committed by patacongo
parent cbf31bca5c
commit ef360394c7
4 changed files with 23 additions and 18 deletions
+2 -2
View File
@@ -175,10 +175,10 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR void *heapstart,
heap->mm_nregions = 0;
#endif
#ifdef __KERNEL__
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
/* Initialize mm_delaylist */
heap->mm_delaylist.flink = NULL;
heap->mm_delaylist = NULL;
#endif
/* Initialize the node array */