source: rtems/cpukit/score/include/rtems/score/context.h @ 6a07436

4.104.114.84.95
Last change on this file since 6a07436 was 6a07436, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 16, 2006 at 3:13:58 PM

2006-01-16 Joel Sherrill <joel@…>

Large patch to improve Doxygen output. As a side-effect, grammar and
spelling errors were corrected, spacing errors were address, and some
variable names were improved.

  • libmisc/monitor/mon-object.c, libmisc/monitor/monitor.h: Account for changing OBJECTS_NO_CLASS to OBJECTS_CLASSIC_NO_CLASS.
  • score/Doxyfile: Set output directory. Predefine some macro values. Turn on graphical output.
  • score/include/rtems/debug.h, score/include/rtems/seterr.h, score/include/rtems/system.h, score/include/rtems/score/address.h, score/include/rtems/score/apiext.h, score/include/rtems/score/apimutex.h, score/include/rtems/score/bitfield.h, score/include/rtems/score/chain.h, score/include/rtems/score/context.h, score/include/rtems/score/coremsg.h, score/include/rtems/score/coremutex.h, score/include/rtems/score/coresem.h, score/include/rtems/score/heap.h, score/include/rtems/score/interr.h, score/include/rtems/score/isr.h, score/include/rtems/score/mpci.h, score/include/rtems/score/mppkt.h, score/include/rtems/score/object.h, score/include/rtems/score/objectmp.h, score/include/rtems/score/priority.h, score/include/rtems/score/stack.h, score/include/rtems/score/states.h, score/include/rtems/score/sysstate.h, score/include/rtems/score/thread.h, score/include/rtems/score/threadmp.h, score/include/rtems/score/threadq.h, score/include/rtems/score/tod.h, score/include/rtems/score/tqdata.h, score/include/rtems/score/userext.h, score/include/rtems/score/watchdog.h, score/include/rtems/score/wkspace.h, score/inline/rtems/score/address.inl, score/inline/rtems/score/chain.inl, score/inline/rtems/score/coremutex.inl, score/inline/rtems/score/coresem.inl, score/inline/rtems/score/heap.inl, score/inline/rtems/score/object.inl, score/inline/rtems/score/stack.inl, score/inline/rtems/score/thread.inl, score/inline/rtems/score/tqdata.inl, score/macros/README, score/src/heap.c, score/src/threadmp.c, score/src/threadready.c, score/src/threadstartmultitasking.c: Improve generated Doxygen output. Fix spelling and grammar errors in comments. Correct names of some variables and propagate changes.
  • Property mode set to 100644
File size: 4.3 KB
Line 
1/**
2 *  @file  rtems/score/context.h
3 *
4 *  This include file contains all information about each thread's context.
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2006.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#ifndef _RTEMS_SCORE_CONTEXT_H
19#define _RTEMS_SCORE_CONTEXT_H
20
21/**
22 *  @defgroup ScoreContext Context Handler
23 *
24 *  This handler encapsulates functionality which abstracts thread context
25 *  management in a portable manner.
26 */
27/**@{*/
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <rtems/score/cpu.h>
34
35/**
36 *  @brief Size of Floating Point Context Area
37 *
38 *  This constant defines the number of bytes required
39 *  to store a full floating point context.
40 */
41#define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
42
43/**
44 *  @brief Is Context Switch Needed?
45 *
46 *  This variable is set to TRUE when a reschedule operation
47 *  has determined that the processor should be taken away from the
48 *  currently executing thread and given to the heir thread.
49 */
50
51SCORE_EXTERN volatile boolean _Context_Switch_necessary;
52
53/**
54 *  @brief Initialize Context Area
55 *  This routine initializes @a _the_context such that the stack
56 *  pointer, interrupt level, and entry point are correct for the
57 *  thread's initial state.
58 *
59 *  @param[in] _the_context will be initialized
60 *  @param[in] _stack is the lowest physical address of the thread's
61 *         context
62 *  @param[in] _size is the size in octets of the thread's context
63 *  @param[in] _isr is the ISR enable level for this thread
64 *  @param[in] _entry is this thread's entry point
65 *  @param[in] _is_fp is set to TRUE if this thread has floating point
66 *         enabled
67 */
68#define _Context_Initialize(_the_context, _stack, _size, _isr, _entry, _is_fp) \
69   _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp )
70
71/**
72 *  @brief Perform Context Switch
73 *
74 *  This routine saves the current context into the @a _executing
75 *  context record and restores the context specified by @a _heir.
76 *
77 *  @param[in] _executing is the currently executing thread's context
78 *  @param[in] _heir is the context of the thread to be switched to
79 */
80#define _Context_Switch( _executing, _heir ) \
81   _CPU_Context_switch( _executing, _heir )
82
83/**
84 *  @brief Restart Currently Executing Thread
85 *
86 *  This routine restarts the calling thread by restoring its initial
87 *  stack pointer and returning to the thread's entry point.
88 *
89 *  @param[in] _the_context is the context of the thread to restart
90 */
91#define _Context_Restart_self( _the_context ) \
92   _CPU_Context_Restart_self( _the_context )
93
94/**
95 *  @brief Return Starting Address of Floating Point Context
96 *
97 *  This function returns the starting address of the floating
98 *  point context save area.  It is assumed that the are reserved
99 *  for the floating point save area is large enough.
100 *
101 *  @param[in] _base is lowest physical address of the floating point
102 *         context save area.
103 *  @param[in] _offset is the offset into the floating point area
104 *
105 *  @return the initial FP context pointer
106 */
107#define _Context_Fp_start( _base, _offset ) \
108   _CPU_Context_Fp_start( (_base), (_offset) )
109
110/**
111 *  @brief Initialize Floating Point Context Area
112 *
113 *  This routine initializes the floating point context save
114 *  area to contain an initial known state.
115 *
116 *  @param[in] _fp_area is the base address of the floating point
117 *         context save area to initialize.
118 */
119#define _Context_Initialize_fp( _fp_area ) \
120   _CPU_Context_Initialize_fp( _fp_area )
121
122/**
123 *  @brief Restore Floating Point Context Area
124 *
125 *  This routine restores the floating point context contained
126 *  in the @a _fp area.  It is assumed that the current
127 *  floating point context has been saved by a previous invocation
128 *  of @a _Context_Save_fp.
129 *
130 *  @param[in] _fp points to the floating point context area to restore.
131 */
132#define _Context_Restore_fp( _fp ) \
133   _CPU_Context_restore_fp( _fp )
134
135/**
136 *  @brief Save Floating Point Context Area
137 *
138 *  This routine saves the current floating point context
139 *  in the @a _fp area.
140 *
141 *  @param[in] _fp points to the floating point context area to restore.
142 */
143#define _Context_Save_fp( _fp ) \
144   _CPU_Context_save_fp( _fp )
145
146#ifdef __cplusplus
147}
148#endif
149
150/**@}*/
151
152#endif
153/* end of include file */
Note: See TracBrowser for help on using the repository browser.