This commit is contained in:
Julian Barathieu 2020-02-06 13:15:15 +01:00
parent be5ec0fcf5
commit a57a8ba192
1 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@ extern const char *PsPrioClassesNames[];
// Re-scheduling and preemption
// XXX atomic operations
//
#define PsRequestReSched() (++KeCurCPU->needReSched)
#define PsDisablePreemption() (++KeCurCPU->preemptCount)
#define PsRequestReSched() do { ++KeCurCPU->needReSched; } while (0)
#define PsDisablePreemption() do { ++KeCurCPU->preemptCount; } while (0)
#define PsEnablePreemption() do { assert(KeCurCPU->preemptCount > 0); \
--KeCurCPU->preemptCount; } while(0)