From f6e07ec33e7e63bc5033bb73d20626fabbb4a3dc Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Thu, 6 Feb 2020 13:32:25 +0100 Subject: [PATCH] Revert "sched.h" This reverts commit 8d128386b96a7ee665adf20ac908ba2276718750. --- include/ke/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ke/sched.h b/include/ke/sched.h index 32856e4..9005de2 100644 --- a/include/ke/sched.h +++ b/include/ke/sched.h @@ -61,8 +61,8 @@ extern const char *PsPrioClassesNames[]; // Re-scheduling and preemption // XXX atomic operations // -#define PsRequestReSched() do { ++KeCurCPU->needReSched; } while (0) -#define PsDisablePreemption() do { ++KeCurCPU->preemptCount; } while (0) +#define PsRequestReSched() (++KeCurCPU->needReSched) +#define PsDisablePreemption() (++KeCurCPU->preemptCount) #define PsEnablePreemption() do { assert(KeCurCPU->preemptCount > 0); \ --KeCurCPU->preemptCount; } while(0)