mm: Simplify the semaphore handling

1.Move all special process to mm_takesemaphore
2.Remove the support of recurive lock
3.Remove mm_trysemaphore function

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie216a6294ab67c5d427f31b089beb15c532f08fe
This commit is contained in:
Xiang Xiao
2021-07-07 21:21:42 +08:00
committed by Gustavo Henrique Nihei
parent f5279f8583
commit 5fe51b923a
11 changed files with 75 additions and 219 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ void mm_addregion(FAR struct mm_heap_s *heap, FAR void *heapstart,
DEBUGASSERT(heapsize <= MMSIZE_MAX + 1);
#endif
mm_takesemaphore(heap);
DEBUGVERIFY(mm_takesemaphore(heap));
/* Adjust the provide heap start and size so that they are both aligned
* with the MM_MIN_CHUNK size.