OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [compat/] [uitron/] [v2_0/] [include/] [uit_objs.hxx] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_COMPAT_UITRON_UIT_OBJS_HXX
2
#define CYGONCE_COMPAT_UITRON_UIT_OBJS_HXX
3
//===========================================================================
4
//
5
//      uit_objs.hxx
6
//
7
//      uITRON static objects
8
//
9
//===========================================================================
10
//####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under
16
// the terms of the GNU General Public License as published by the Free
17
// Software Foundation; either version 2 or (at your option) any later version.
18
//
19
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22
// for more details.
23
//
24
// You should have received a copy of the GNU General Public License along
25
// with eCos; if not, write to the Free Software Foundation, Inc.,
26
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27
//
28
// As a special exception, if other files instantiate templates or use macros
29
// or inline functions from this file, or you compile this file and link it
30
// with other works to produce a work based on this file, this file does not
31
// by itself cause the resulting work to be covered by the GNU General Public
32
// License. However the source code for this file must still be made available
33
// in accordance with section (3) of the GNU General Public License.
34
//
35
// This exception does not invalidate any other reasons why a work based on
36
// this file might be covered by the GNU General Public License.
37
//
38
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39
// at http://sources.redhat.com/ecos/ecos-license/
40
// -------------------------------------------
41
//####ECOSGPLCOPYRIGHTEND####
42
//===========================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):   hmt
46
// Contributors:        hmt
47
// Date:        1998-03-13
48
// Purpose:     uITRON static system objects
49
// Description:
50
//
51
//####DESCRIPTIONEND####
52
//
53
//===========================================================================
54
 
55
#include              // uITRON setup CYGNUM_UITRON_SEMAS
56
                                        // CYGPKG_UITRON et al
57
 
58
#ifdef CYGPKG_UITRON
59
 
60
#include          // types; cyg_int32, CYG_ADDRWORD
61
 
62
#include 
63
 
64
#include 
65
 
66
#include         // Cyg_Thread
67
#include           // Cyg_Mbox
68
#include           // Cyg_Flag
69
#include          // Cyg_Counting_Semaphore2
70
#include     // Cyg_Mempool_Fixed
71
#include       // Cyg_Mempool_Variable
72
#include          // Cyg_Timer
73
 
74
// ------------------------------------------------------------------------
75
// Some pasting macros to create names of the config macro and the
76
// static data resulting:
77
 
78
#define CYG_UITRON_NUM( _which_ )  (CYGNUM_UITRON_ ## _which_)
79
#define CYG_UITRON_OBJS( _which_ )  cyg_uitron_ ## _which_
80
#define CYG_UITRON_PTRS( _which_ )  cyg_uitron_ ## _which_ ## _ptrs
81
// ------------------------------------------------------------------------
82
// CYG_UITRON_DECL
83
//
84
// Macro to declare static uitron static objects; uses the appropriate
85
// config define for the number of them to have.
86
 
87
#define CYG_UITRON_OBJS_INIT_PRIORITY CYG_INIT_PRIORITY( COMPAT )
88
 
89
#define CYG_UITRON_DECL( _which_ ) \
90
    CYG_UITRON_OBJS( _which_ ) [ CYG_UITRON_NUM( _which_ ) ] \
91
    CYG_UITRON_OBJS_INIT_PRIORITY
92
 
93
// and the array of pointers to them for those with dynamic existence:
94
#define CYG_UITRON_DECL_PTRS( _which_ ) \
95
    CYG_UITRON_PTRS( _which_ ) [ CYG_UITRON_NUM( _which_ ) ]
96
 
97
 
98
// ------------------------------------------------------------------------
99
// The external system objects themselves.
100
 
101
#ifdef CYGPKG_UITRON_SEMAS
102
extern
103
Cyg_Counting_Semaphore2 CYG_UITRON_OBJS( SEMAS )        [];
104
#ifdef CYGPKG_UITRON_SEMAS_CREATE_DELETE
105
extern
106
Cyg_Counting_Semaphore2 *CYG_UITRON_PTRS( SEMAS )       [];
107
#endif
108
#endif
109
#ifdef CYGPKG_UITRON_MBOXES
110
extern
111
Cyg_Mbox                CYG_UITRON_OBJS( MBOXES )       [];
112
#ifdef CYGPKG_UITRON_MBOXES_CREATE_DELETE
113
extern
114
Cyg_Mbox                *CYG_UITRON_PTRS( MBOXES )      [];
115
#endif
116
#endif
117
#ifdef CYGPKG_UITRON_FLAGS
118
extern
119
Cyg_Flag                CYG_UITRON_OBJS( FLAGS )        [];
120
#ifdef CYGPKG_UITRON_FLAGS_CREATE_DELETE
121
extern
122
Cyg_Flag                *CYG_UITRON_PTRS( FLAGS )       [];
123
#endif
124
#endif
125
// there must always be tasks
126
extern
127
Cyg_Thread              CYG_UITRON_OBJS( TASKS )        [];
128
#ifdef CYGPKG_UITRON_TASKS_CREATE_DELETE
129
extern
130
Cyg_Thread              *CYG_UITRON_PTRS( TASKS )       [];
131
#endif
132
// no endif
133
#ifdef CYGPKG_UITRON_MEMPOOLFIXED
134
extern
135
Cyg_Mempool_Fixed       CYG_UITRON_OBJS( MEMPOOLFIXED ) [];
136
#ifdef CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE
137
extern
138
Cyg_Mempool_Fixed       *CYG_UITRON_PTRS( MEMPOOLFIXED )[];
139
#endif
140
#endif
141
#ifdef CYGPKG_UITRON_MEMPOOLVAR
142
extern
143
Cyg_Mempool_Variable    CYG_UITRON_OBJS( MEMPOOLVAR )   [];
144
#ifdef CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE
145
extern
146
Cyg_Mempool_Variable    *CYG_UITRON_PTRS( MEMPOOLVAR )  [];
147
#endif
148
#endif
149
#ifdef CYGPKG_UITRON_CYCLICS
150
extern
151
Cyg_Timer               CYG_UITRON_OBJS( CYCLICS )      [];
152
#endif
153
#ifdef CYGPKG_UITRON_ALARMS
154
extern
155
Cyg_Timer               CYG_UITRON_OBJS( ALARMS )       [];
156
#endif
157
 
158
// ------------------------------------------------------------------------
159
// Ancillary system objects - cleaner than extending the basic class
160
 
161
#ifdef CYGIMP_THREAD_PRIORITY
162
// An array of priorities, for resetting back to the "created" prio when a
163
// task cycles though exit, dormancy, restart.
164
extern cyg_priority
165
cyg_uitron_task_initial_priorities[ CYG_UITRON_NUM( TASKS ) ];
166
// and an accessor macro, for the addressing of this is naturally
167
// from 1..N also:
168
#define CYG_UITRON_TASK_INITIAL_PRIORITY( _tskid_ ) \
169
    (cyg_uitron_task_initial_priorities[ (_tskid_) - 1 ])
170
#endif // CYGIMP_THREAD_PRIORITY
171
 
172
// ------------------------------------------------------------------------
173
 
174
#endif // CYGPKG_UITRON
175
 
176
#endif // CYGONCE_COMPAT_UITRON_UIT_OBJS_HXX
177
// EOF uit_objs.hxx

powered by: WebSVN 2.1.0

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