source: rtems/cpukit/score/src/schedulersimpleblock.c @ 0118ed6

4.115
Last change on this file since 0118ed6 was 0118ed6, checked in by Joel Sherrill <joel.sherrill@…>, on 03/16/11 at 16:32:22

2011-03-16 Jennifer Averett <jennifer.averett@…>

PR 1743/cpu

  • sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add Simple Priority Scheduler as complement to existing Deterministic Priority Scheduler. This scheduler serves both as an example and as a lighter weight implementation for smaller systems.
  • score/include/rtems/score/schedulersimple.h, score/inline/rtems/score/schedulersimple.inl, score/src/schedulersimple.c, score/src/schedulersimpleblock.c, score/src/schedulersimpleenqueue.c, score/src/schedulersimpleenqueuefirst.c, score/src/schedulersimpleextract.c, score/src/schedulersimplereadyqueueenqueue.c, score/src/schedulersimplereadyqueueenqueuefirst.c, score/src/schedulersimpleschedule.c, score/src/schedulersimpleunblock.c, score/src/schedulersimpleyield.c: New files.
  • Property mode set to 100644
File size: 915 bytes
Line 
1/*
2 *  Scheduler Simple Handler / Block
3 *
4 *  COPYRIGHT (c) 2011.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/system.h>
19#include <rtems/score/context.h>
20#include <rtems/score/interr.h>
21#include <rtems/score/isr.h>
22#include <rtems/score/object.h>
23#include <rtems/score/priority.h>
24#include <rtems/score/scheduler.h>
25#include <rtems/score/thread.h>
26#include <rtems/score/schedulersimple.h>
27
28void _Scheduler_simple_Block(
29  Thread_Control   *the_thread
30)
31{
32  _Scheduler_simple_Extract(the_thread);
33
34  if ( _Thread_Is_heir( the_thread ) )
35    _Scheduler_simple_Schedule();
36
37  if ( _Thread_Is_executing( the_thread ) )
38    _Thread_Dispatch_necessary = true;
39}
Note: See TracBrowser for help on using the repository browser.