mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 21:05:22 +08:00
score/scheduling: Use RBTree_First instead of Peek in EDF scheduler.
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Petr Benes.
|
||||
* Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
|
||||
* Copyright (C) 2011-2012 On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
@@ -19,10 +17,9 @@
|
||||
|
||||
void _Scheduler_EDF_Schedule(void)
|
||||
{
|
||||
RBTree_Node *first_node =
|
||||
_RBTree_Peek(&_Scheduler_EDF_Ready_queue, RBT_LEFT);
|
||||
RBTree_Node *first = _RBTree_First(&_Scheduler_EDF_Ready_queue, RBT_LEFT);
|
||||
Scheduler_EDF_Per_thread *sched_info =
|
||||
_RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
|
||||
_RBTree_Container_of(first, Scheduler_EDF_Per_thread, Node);
|
||||
|
||||
_Thread_Heir = (Thread_Control *) sched_info->thread;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user