5
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Initializes Enviroment for A Thread |
---|
5 | * |
---|
6 | * @ingroup RTEMSScoreThread |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * COPYRIGHT (c) 1989-1999. |
---|
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.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #if HAVE_CONFIG_H |
---|
19 | #include "config.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <rtems/score/threadimpl.h> |
---|
23 | |
---|
24 | void _Thread_Load_environment( |
---|
25 | Thread_Control *the_thread |
---|
26 | ) |
---|
27 | { |
---|
28 | #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) |
---|
29 | if ( the_thread->Start.fp_context ) { |
---|
30 | the_thread->fp_context = the_thread->Start.fp_context; |
---|
31 | _Context_Initialize_fp( &the_thread->fp_context ); |
---|
32 | } |
---|
33 | #endif |
---|
34 | |
---|
35 | the_thread->is_preemptible = the_thread->Start.is_preemptible; |
---|
36 | the_thread->budget_algorithm = the_thread->Start.budget_algorithm; |
---|
37 | the_thread->budget_callout = the_thread->Start.budget_callout; |
---|
38 | |
---|
39 | _Context_Initialize( |
---|
40 | &the_thread->Registers, |
---|
41 | the_thread->Start.Initial_stack.area, |
---|
42 | the_thread->Start.Initial_stack.size, |
---|
43 | the_thread->Start.isr_level, |
---|
44 | _Thread_Handler, |
---|
45 | the_thread->is_fp, |
---|
46 | the_thread->Start.tls_area |
---|
47 | ); |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.