RTEMS  5.0.0
context.h
Go to the documentation of this file.
1 
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.org/license/LICENSE.
16  */
17 
18 #ifndef _RTEMS_SCORE_CONTEXT_H
19 #define _RTEMS_SCORE_CONTEXT_H
20 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include <rtems/score/cpu.h>
39 
46 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
47  #define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
48 #else
49  #define CONTEXT_FP_SIZE 0
50 #endif
51 
69 #define _Context_Initialize( _the_context, _stack, _size, _isr, _entry, \
70  _is_fp, _tls_area ) \
71  _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry, \
72  _is_fp, _tls_area )
73 
83 #if defined(_CPU_Context_Initialization_at_thread_begin)
84  #define _Context_Initialization_at_thread_begin() \
85  _CPU_Context_Initialization_at_thread_begin()
86 #else
87  #define _Context_Initialization_at_thread_begin()
88 #endif
89 
99 #define _Context_Switch( _executing, _heir ) \
100  _CPU_Context_switch( _executing, _heir )
101 
110 #define _Context_Restart_self( _the_context ) \
111  _CPU_Context_Restart_self( _the_context )
112 
122 #define _Context_Initialize_fp( _fp_area ) \
123  _CPU_Context_Initialize_fp( _fp_area )
124 
135 #define _Context_Restore_fp( _fp ) \
136  _CPU_Context_restore_fp( _fp )
137 
146 #define _Context_Save_fp( _fp ) \
147  _CPU_Context_save_fp( _fp )
148 
149 #if defined(_CPU_Context_Destroy)
150  #define _Context_Destroy( _the_thread, _the_context ) \
151  _CPU_Context_Destroy( _the_thread, _the_context )
152 #else
153  #define _Context_Destroy( _the_thread, _the_context )
154 #endif
155 
156 #ifdef __cplusplus
157 }
158 #endif
159 
162 #endif
163 /* end of include file */