source: rtems/cpukit/score/src/threadsettransient.c @ c6e21ee1

4.115
Last change on this file since c6e21ee1 was c6e21ee1, checked in by Sebastian Huber <sebastian.huber@…>, on 07/24/13 at 11:12:38

score: Create scheduler implementation header

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

  • Property mode set to 100644
File size: 876 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Sets the Transient State for a Thread
5 *
6 * @ingroup ScoreThread
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2011.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/score/thread.h>
23#include <rtems/score/isr.h>
24#include <rtems/score/schedulerimpl.h>
25
26void _Thread_Set_transient(
27  Thread_Control *the_thread
28)
29{
30  ISR_Level             level;
31  uint32_t              old_state;
32
33  _ISR_Disable( level );
34
35  old_state = the_thread->current_state;
36  the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
37
38  if ( _States_Is_ready( old_state ) ) {
39    _Scheduler_Extract( the_thread );
40  }
41
42  _ISR_Enable( level );
43
44}
Note: See TracBrowser for help on using the repository browser.