summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadqops.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/threadqops.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/cpukit/score/src/threadqops.c b/cpukit/score/src/threadqops.c
index 33fc5a44cb..9a09b4c442 100644
--- a/cpukit/score/src/threadqops.c
+++ b/cpukit/score/src/threadqops.c
@@ -12,7 +12,7 @@
*/
/*
- * Copyright (c) 2015, 2021 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -156,6 +156,8 @@ static void _Thread_queue_FIFO_do_initialize(
{
Scheduler_Node *scheduler_node;
+ (void) queue;
+ (void) queue_context;
scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
_Chain_Initialize_node( &scheduler_node->Wait.Priority.Node.Node.Chain );
@@ -291,6 +293,7 @@ static Thread_queue_Priority_queue *_Thread_queue_Priority_queue_by_index(
)
{
#if defined(RTEMS_SMP)
+ _Assert( scheduler_index < _Scheduler_Count );
return &heads->Priority[ scheduler_index ];
#else
(void) scheduler_index;
@@ -404,8 +407,12 @@ static void _Thread_queue_Priority_priority_actions(
break;
}
+#if defined(RTEMS_SMP)
priority_aggregation = _Priority_Get_next_action( priority_aggregation );
- } while ( _Priority_Actions_is_valid( priority_aggregation ) );
+ } while ( priority_aggregation != NULL );
+#else
+ } while ( false );
+#endif
}
static void _Thread_queue_Priority_do_initialize(
@@ -734,14 +741,18 @@ static void _Thread_queue_Priority_inherit_priority_actions(
priority_aggregation = _Priority_Actions_move( priority_actions );
do {
+#if defined(RTEMS_SMP)
Priority_Aggregation *next_aggregation;
+#endif
Scheduler_Node *scheduler_node;
size_t scheduler_index;
Thread_queue_Priority_queue *priority_queue;
Scheduler_Node *scheduler_node_of_owner;
Priority_Action_type priority_action_type;
+#if defined(RTEMS_SMP)
next_aggregation = _Priority_Get_next_action( priority_aggregation );
+#endif
scheduler_node = SCHEDULER_NODE_OF_WAIT_PRIORITY( priority_aggregation );
scheduler_index = _Thread_queue_Scheduler_index( scheduler_node );
@@ -797,8 +808,12 @@ static void _Thread_queue_Priority_inherit_priority_actions(
break;
}
+#if defined(RTEMS_SMP)
priority_aggregation = next_aggregation;
- } while ( _Priority_Actions_is_valid( priority_aggregation ) );
+ } while ( priority_aggregation != NULL );
+#else
+ } while ( false );
+#endif
}
static void _Thread_queue_Priority_inherit_do_initialize(