From 43f9fd4180030081daae9122bd57a521ec9c58e1 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 30 Oct 2009 15:45:38 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1258 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chheap.c | 2 +- os/kernel/src/chschd.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'os/kernel/src') diff --git a/os/kernel/src/chheap.c b/os/kernel/src/chheap.c index d1dab1580..203d69d13 100644 --- a/os/kernel/src/chheap.c +++ b/os/kernel/src/chheap.c @@ -255,7 +255,7 @@ size_t chHeapStatus(MemoryHeap *heapp, size_t *sizep) { #if CH_USE_MUTEXES #define H_LOCK() chMtxLock(&hmtx) -#define H_UNLOCK() chMtxLock(&hmtx) +#define H_UNLOCK() chMtxUnock() static Mutex hmtx; #elif CH_USE_SEMAPHORES #define H_LOCK() chSemWait(&hsem) diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c index 150169481..87c2e2f8c 100644 --- a/os/kernel/src/chschd.c +++ b/os/kernel/src/chschd.c @@ -268,7 +268,9 @@ void chSchDoYieldS(void) { /* Pick the first thread from the ready queue and makes it current.*/ (currp = fifo_remove(&rlist.r_queue))->p_state = PRCURR; +#if CH_TIME_QUANTUM > 0 rlist.r_preempt = CH_TIME_QUANTUM; +#endif chDbgTrace(otp, currp); chSysSwitchI(otp, currp); } -- cgit v1.2.3