summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/schedulersimpleimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-27 08:35:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 11:00:28 +0100
commit6d20f0c5257164d8ec8127e3e55a1686b7dba8d1 (patch)
treef6dc441d25e8f9141adc0b2cfc8ff05eda0d40a7 /cpukit/include/rtems/score/schedulersimpleimpl.h
parentscore: Rework idle handling in SMP schedulers (diff)
downloadrtems-6d20f0c5257164d8ec8127e3e55a1686b7dba8d1.tar.bz2
score: Add node to insert to Chain_Node_order
This allows to use additional members of the nodes for comparision. Update #4534.
Diffstat (limited to 'cpukit/include/rtems/score/schedulersimpleimpl.h')
-rw-r--r--cpukit/include/rtems/score/schedulersimpleimpl.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpukit/include/rtems/score/schedulersimpleimpl.h b/cpukit/include/rtems/score/schedulersimpleimpl.h
index 08ad7b8c66..9d762e058a 100644
--- a/cpukit/include/rtems/score/schedulersimpleimpl.h
+++ b/cpukit/include/rtems/score/schedulersimpleimpl.h
@@ -48,21 +48,26 @@ RTEMS_INLINE_ROUTINE Scheduler_simple_Context *
/**
* @brief Checks if the priority is less or equal than the priority of the node.
*
- * @param to_insert The priority to check whether it is less or equal than @a next.
- * @param next The Chain node to compare the priority of.
+ * @param key is the priority to compare.
+ *
+ * @param to_insert is the chain node to insert.
+ *
+ * @param next is the chain node to compare the priority of.
*
* @retval true @a to_insert is smaller or equal than the priority of @a next.
* @retval false @a to_insert is greater than the priority of @a next.
*/
RTEMS_INLINE_ROUTINE bool _Scheduler_simple_Priority_less_equal(
- const void *to_insert,
+ const void *key,
+ const Chain_Node *to_insert,
const Chain_Node *next
)
{
const unsigned int *priority_to_insert;
const Thread_Control *thread_next;
- priority_to_insert = (const unsigned int *) to_insert;
+ (void) to_insert;
+ priority_to_insert = (const unsigned int *) key;
thread_next = (const Thread_Control *) next;
return *priority_to_insert <= _Thread_Get_priority( thread_next );