summaryrefslogblamecommitdiffstats
path: root/cpukit/score/src/scheduleredfblock.c
blob: 4ad767d7bf29432521e9aaf92b10e32a6bf6f701 (plain) (tree)
1
2
3
4
5
6
7
8







                                             






                                                                       





                   
                                     
                                   














                                           
/**
 * @file
 *
 * @brief Removes the Thread from Ready Queue
 *
 * @ingroup ScoreScheduler
 */

/*
 *  Copyright (C) 2011 Petr Benes.
 *  Copyright (C) 2011 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.
 */

#if HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems/score/scheduleredf.h>
#include <rtems/score/threadimpl.h>

void _Scheduler_EDF_Block(
  Thread_Control    *the_thread
)
{
  _Scheduler_EDF_Extract( the_thread );

  /* TODO: flash critical section? */

  if ( _Thread_Is_heir( the_thread ) )
    _Scheduler_EDF_Schedule();

  if ( _Thread_Is_executing( the_thread ) )
    _Thread_Dispatch_necessary = true;
}