-#define pset_hint_low(ps, p) \
-MACRO_BEGIN \
- if ((ps)->low_hint != PROCESSOR_NULL) { \
- if ((p) != (ps)->low_hint) { \
- if ((p)->runq.count < (ps)->low_hint->runq.count) \
- (ps)->low_hint = (p); \
- } \
- } \
- else \
- (ps)->low_hint = (p); \
+#define pset_pri_hint(ps, p, pri) \
+MACRO_BEGIN \
+ if ((p) != (ps)->low_pri) { \
+ if ((pri) < (ps)->low_pri->current_pri) \
+ (ps)->low_pri = (p); \
+ else \
+ if ((ps)->low_pri->state < PROCESSOR_IDLE) \
+ (ps)->low_pri = (p); \
+ } \
+MACRO_END
+
+#define pset_count_hint(ps, p, cnt) \
+MACRO_BEGIN \
+ if ((p) != (ps)->low_count) { \
+ if ((cnt) < SCHED(processor_runq_count)((ps)->low_count)) \
+ (ps)->low_count = (p); \
+ else \
+ if ((ps)->low_count->state < PROCESSOR_IDLE) \
+ (ps)->low_count = (p); \
+ } \