diff options
Diffstat (limited to 'os/kernel/src')
-rw-r--r-- | os/kernel/src/chheap.c | 2 | ||||
-rw-r--r-- | os/kernel/src/chschd.c | 2 |
2 files changed, 3 insertions, 1 deletions
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); } |