source: rtems/c/src/exec/score/headers/context.h @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*  context.h
2 *
3 *  This include file contains all information about a context.
4 *
5 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
6 *  On-Line Applications Research Corporation (OAR).
7 *  All rights assigned to U.S. Government, 1994.
8 *
9 *  This material may be reproduced by or for the U.S. Government pursuant
10 *  to the copyright license under the clause at DFARS 252.227-7013.  This
11 *  notice must appear in all copies of this file and its derivatives.
12 *
13 *  $Id$
14 */
15
16#ifndef __RTEMS_CONTEXT_h
17#define __RTEMS_CONTEXT_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/core/cpu.h>
24
25/*
26 *  The following constant defines the number of bytes required
27 *  to store a full floating point context.
28 */
29
30#define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
31
32/*
33 *  The following variable is set to TRUE when a reschedule operation
34 *  has determined that the processor should be taken away from the
35 *  currently executing thread and given to the heir thread.
36 */
37
38EXTERN boolean _Context_Switch_necessary;
39
40/*
41 *  _Context_Initialize
42 *
43 *  DESCRIPTION:
44 *
45 *  This routine initializes THE_CONTEXT such that the stack
46 *  pointer, interrupt level, and entry point are correct for the
47 *  thread's initial state.
48 */
49
50#define _Context_Initialize( _the_context, _stack, _size, _isr, _entry ) \
51   _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry )
52
53/*
54 *  _Context_Switch
55 *
56 *  DESCRIPTION:
57 *
58 *  This routine saves the current context into the EXECUTING
59 *  context record and restores the context specified by HEIR.
60 */
61
62#define _Context_Switch( _executing, _heir ) \
63   _CPU_Context_switch( _executing, _heir )
64
65/*
66 *  _Context_Restart_self
67 *
68 *  DESCRIPTION:
69 *
70 *  This routine restarts the calling thread by restoring its initial
71 *  stack pointer and returning to the thread's entry point.
72 */
73
74#define _Context_Restart_self( _the_context ) \
75   _CPU_Context_Restart_self( _the_context )
76
77/*
78 *  _Context_Fp_start
79 *
80 *  DESCRIPTION:
81 *
82 *  This function returns the starting address of the floating
83 *  point context save area.  It is assumed that the are reserved
84 *  for the floating point save area is large enough.
85 */
86
87#define _Context_Fp_start( _base, _offset ) \
88   _CPU_Context_Fp_start( (_base), (_offset) )
89
90/*
91 *  _Context_Initialize_fp
92 *
93 *  DESCRIPTION:
94 *
95 *  This routine initializes the floating point context save
96 *  area to contain an initial known state.
97 */
98
99#define _Context_Initialize_fp( _fp_area ) \
100   _CPU_Context_Initialize_fp( _fp_area )
101
102/*
103 *  _Context_Restore_fp
104 *
105 *  DESCRIPTION:
106 *
107 *  This routine restores the floating point context contained
108 *  in the FP_CONTEXT area.  It is assumed that the current
109 *  floating point context has been saved by a previous invocation
110 *  of SAVE_FP.
111 */
112
113#define _Context_Restore_fp( _fp ) \
114   _CPU_Context_restore_fp( _fp )
115
116/*
117 *  _Context_Save_fp
118 *
119 *  DESCRIPTION:
120 *
121 *  This routine saves the current floating point context
122 *  in the FP_CONTEXT area.
123 */
124
125#define _Context_Save_fp( _fp ) \
126   _CPU_Context_save_fp( _fp )
127
128#ifdef __cplusplus
129}
130#endif
131
132#endif
133/* end of include file */
Note: See TracBrowser for help on using the repository browser.