4.115
Last change
on this file since eea7c937 was
5618c37a,
checked in by Sebastian Huber <sebastian.huber@…>, on 07/24/13 at 13:14:48
|
score: Create thread implementation header
Move implementation specific parts of thread.h and thread.inl into new
header file threadimpl.h. The thread.h contains now only the
application visible API.
Remove superfluous header file includes from various files.
|
-
Property mode set to
100644
|
File size:
885 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/threadimpl.h> |
---|
23 | #include <rtems/score/isrlevel.h> |
---|
24 | #include <rtems/score/schedulerimpl.h> |
---|
25 | |
---|
26 | void _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.