From e248e89ddba5f2720fbf59d1ad2c05c8cc101701 Mon Sep 17 00:00:00 2001 From: Terraneo Federico <fede.tft@miosix.org> Date: Sun, 7 May 2023 18:38:33 +0200 Subject: [PATCH] Add missing priority comparison operators for priority scheduler --- .../scheduler/priority/priority_scheduler_types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/miosix/kernel/scheduler/priority/priority_scheduler_types.h b/miosix/kernel/scheduler/priority/priority_scheduler_types.h index 454776d3..600c4e06 100644 --- a/miosix/kernel/scheduler/priority/priority_scheduler_types.h +++ b/miosix/kernel/scheduler/priority/priority_scheduler_types.h @@ -91,11 +91,21 @@ inline bool operator<(PrioritySchedulerPriority a, PrioritySchedulerPriority b) return a.get() < b.get(); } +inline bool operator<=(PrioritySchedulerPriority a, PrioritySchedulerPriority b) +{ + return a.get() <= b.get(); +} + inline bool operator>(PrioritySchedulerPriority a, PrioritySchedulerPriority b) { return a.get() > b.get(); } +inline bool operator>=(PrioritySchedulerPriority a, PrioritySchedulerPriority b) +{ + return a.get() >= b.get(); +} + inline bool operator==(PrioritySchedulerPriority a, PrioritySchedulerPriority b) { return a.get() == b.get(); -- GitLab