From e3a5e25315231a31932e865d3f6be9c1cd1f159b Mon Sep 17 00:00:00 2001 From: ecarusi Date: Mon, 5 Jul 2010 17:47:44 +0000 Subject: [PATCH] CH_USE_MALLOC_HEAP and H_(UN)LOCK redefinition fix git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2055 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chheap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os/kernel/src/chheap.c b/os/kernel/src/chheap.c index ede326b59..820f15362 100644 --- a/os/kernel/src/chheap.c +++ b/os/kernel/src/chheap.c @@ -41,6 +41,8 @@ #if CH_USE_HEAP +#if !CH_USE_MALLOC_HEAP + /* * Defaults on the best synchronization mechanism available. */ @@ -52,8 +54,6 @@ #define H_UNLOCK(h) chSemSignal(&(h)->h_sem) #endif -#if !CH_USE_MALLOC_HEAP - /** * @brief Default heap descriptor. */ @@ -253,7 +253,7 @@ size_t chHeapStatus(MemoryHeap *heapp, size_t *sizep) { #if CH_USE_MUTEXES #define H_LOCK() chMtxLock(&hmtx) -#define H_UNLOCK() chMtxUnock() +#define H_UNLOCK() chMtxUnlock() static Mutex hmtx; #elif CH_USE_SEMAPHORES #define H_LOCK() chSemWait(&hsem)