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)