OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [include/] [rtems/] [score/] [context.h] - Blame information for rev 587

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  context.h
2
 *
3
 *  This include file contains all information about a context.
4
 *
5
 *  COPYRIGHT (c) 1989-1999.
6
 *  On-Line Applications Research Corporation (OAR).
7
 *
8
 *  The license and distribution terms for this file may be
9
 *  found in the file LICENSE in this distribution or at
10
 *  http://www.OARcorp.com/rtems/license.html.
11
 *
12
 *  $Id: context.h,v 1.2 2001-09-27 11:59:32 chris Exp $
13
 */
14
 
15
#ifndef __RTEMS_CONTEXT_h
16
#define __RTEMS_CONTEXT_h
17
 
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
 
22
#include <rtems/score/cpu.h>
23
 
24
/*
25
 *  The following constant defines the number of bytes required
26
 *  to store a full floating point context.
27
 */
28
 
29
#define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE
30
 
31
/*
32
 *  The following variable is set to TRUE when a reschedule operation
33
 *  has determined that the processor should be taken away from the
34
 *  currently executing thread and given to the heir thread.
35
 */
36
 
37
SCORE_EXTERN volatile boolean _Context_Switch_necessary;
38
 
39
/*
40
 *  _Context_Initialize
41
 *
42
 *  DESCRIPTION:
43
 *
44
 *  This routine initializes THE_CONTEXT such that the stack
45
 *  pointer, interrupt level, and entry point are correct for the
46
 *  thread's initial state.
47
 */
48
 
49
#define \
50
   _Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp ) \
51
   _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp )
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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.