diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-08-02 16:22:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-08-05 09:30:33 +0200 |
commit | 40dcafaf80a29c20d74594853a8ff04441eabd9c (patch) | |
tree | 1541f69ee011198bd995f38069a2b1300fc4de76 /cpukit/score/src/scheduleredf.c | |
parent | rbtree: Rename find header in find control (diff) | |
download | rtems-40dcafaf80a29c20d74594853a8ff04441eabd9c.tar.bz2 |
Add and use RTEMS_CONTAINER_OF()
Diffstat (limited to 'cpukit/score/src/scheduleredf.c')
-rw-r--r-- | cpukit/score/src/scheduleredf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/score/src/scheduleredf.c b/cpukit/score/src/scheduleredf.c index 01b5244cf6..6dfa288999 100644 --- a/cpukit/score/src/scheduleredf.c +++ b/cpukit/score/src/scheduleredf.c @@ -25,10 +25,12 @@ int _Scheduler_EDF_Compare( const RBTree_Node* n2 ) { - Priority_Control value1 = _RBTree_Container_of - (n1,Scheduler_EDF_Node,Node)->thread->current_priority; - Priority_Control value2 = _RBTree_Container_of - (n2,Scheduler_EDF_Node,Node)->thread->current_priority; + Scheduler_EDF_Node *edf1 = + RTEMS_CONTAINER_OF( n1, Scheduler_EDF_Node, Node ); + Scheduler_EDF_Node *edf2 = + RTEMS_CONTAINER_OF( n2, Scheduler_EDF_Node, Node ); + Priority_Control value1 = edf1->thread->current_priority; + Priority_Control value2 = edf2->thread->current_priority; /* * This function compares only numbers for the red-black tree, |