1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00
This commit is contained in:
Julian Barathieu 2020-02-06 13:15:15 +01:00
parent be5ec0fcf5
commit a57a8ba192

View File

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