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:
955 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Clear Thread state |
---|
5 | * @ingroup ScoreThread |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2011. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * 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/thread.h> |
---|
22 | #include <rtems/score/schedulerimpl.h> |
---|
23 | #include <rtems/score/states.h> |
---|
24 | |
---|
25 | void _Thread_Clear_state( |
---|
26 | Thread_Control *the_thread, |
---|
27 | States_Control state |
---|
28 | ) |
---|
29 | { |
---|
30 | ISR_Level level; |
---|
31 | States_Control current_state; |
---|
32 | |
---|
33 | _ISR_Disable( level ); |
---|
34 | current_state = the_thread->current_state; |
---|
35 | |
---|
36 | if ( current_state & state ) { |
---|
37 | current_state = |
---|
38 | the_thread->current_state = _States_Clear( state, current_state ); |
---|
39 | |
---|
40 | if ( _States_Is_ready( current_state ) ) { |
---|
41 | _Scheduler_Unblock( the_thread ); |
---|
42 | } |
---|
43 | } |
---|
44 | _ISR_Enable( level ); |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.