[rtems commit] scheduler/EDF: Use unprotected insert and extract
Sebastian Huber
sebh at rtems.org
Thu Nov 21 11:52:13 UTC 2013
Module: rtems
Branch: master
Commit: eea7c937066a9ff760429c3f1170d72925745535
Changeset: http://git.rtems.org/rtems/commit/?id=eea7c937066a9ff760429c3f1170d72925745535
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Nov 19 16:09:17 2013 +0100
scheduler/EDF: Use unprotected insert and extract
Interrupts are disabled by the caller _Thread_Change_priority() or
_Thread_Set_transient() or directly in the scheduler operation. Thus
there is no need to use protected variants.
---
cpukit/score/src/scheduleredfenqueue.c | 2 +-
cpukit/score/src/scheduleredfextract.c | 2 +-
cpukit/score/src/scheduleredfyield.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpukit/score/src/scheduleredfenqueue.c b/cpukit/score/src/scheduleredfenqueue.c
index 921721f..9a9b906 100644
--- a/cpukit/score/src/scheduleredfenqueue.c
+++ b/cpukit/score/src/scheduleredfenqueue.c
@@ -31,6 +31,6 @@ void _Scheduler_EDF_Enqueue(
(Scheduler_EDF_Per_thread*) the_thread->scheduler_info;
RBTree_Node *node = &(sched_info->Node);
- _RBTree_Insert( &_Scheduler_EDF_Ready_queue, node );
+ _RBTree_Insert_unprotected( &_Scheduler_EDF_Ready_queue, node );
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_YES;
}
diff --git a/cpukit/score/src/scheduleredfextract.c b/cpukit/score/src/scheduleredfextract.c
index 7547caf..b2f91cc 100644
--- a/cpukit/score/src/scheduleredfextract.c
+++ b/cpukit/score/src/scheduleredfextract.c
@@ -31,6 +31,6 @@ void _Scheduler_EDF_Extract(
(Scheduler_EDF_Per_thread*) the_thread->scheduler_info;
RBTree_Node *node = &(sched_info->Node);
- _RBTree_Extract( &_Scheduler_EDF_Ready_queue, node );
+ _RBTree_Extract_unprotected( &_Scheduler_EDF_Ready_queue, node );
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
diff --git a/cpukit/score/src/scheduleredfyield.c b/cpukit/score/src/scheduleredfyield.c
index fc5b13a..4a80168 100644
--- a/cpukit/score/src/scheduleredfyield.c
+++ b/cpukit/score/src/scheduleredfyield.c
@@ -35,8 +35,8 @@ void _Scheduler_EDF_Yield( Thread_Control *thread )
* The RBTree has more than one node, enqueue behind the tasks
* with the same priority in case there are such ones.
*/
- _RBTree_Extract( &_Scheduler_EDF_Ready_queue, thread_node );
- _RBTree_Insert( &_Scheduler_EDF_Ready_queue, thread_node );
+ _RBTree_Extract_unprotected( &_Scheduler_EDF_Ready_queue, thread_node );
+ _RBTree_Insert_unprotected( &_Scheduler_EDF_Ready_queue, thread_node );
_ISR_Flash( level );
More information about the vc
mailing list