source: rtems/cpukit/score/src/schedulersimpleyield.c @ bd5606ab

4.115
Last change on this file since bd5606ab was bd5606ab, checked in by Sebastian Huber <sebastian.huber@…>, on 07/24/13 at 09:37:28

score: Create schedulersimple impl header

Move implementation specific parts of schedulersimple.h and
schedulersimple.inl into new header file schedulersimpleimpl.h. The
schedulersimple.h contains now only the application visible API.

  • Property mode set to 100644
File size: 804 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Simple Schedule Yield CPU
5 * @ingroup ScoreScheduler
6 */
7
8/*
9 *  COPYRIGHT (c) 2011.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/schedulersimpleimpl.h>
22#include <rtems/score/isr.h>
23
24void _Scheduler_simple_Yield( Thread_Control *thread )
25{
26  ISR_Level       level;
27
28  _ISR_Disable( level );
29
30    _Scheduler_simple_Ready_queue_requeue( &_Scheduler, thread );
31
32    _ISR_Flash( level );
33
34    _Scheduler_simple_Schedule();
35
36    if ( !_Thread_Is_heir( thread ) )
37      _Thread_Dispatch_necessary = true;
38
39  _ISR_Enable( level );
40}
Note: See TracBrowser for help on using the repository browser.