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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [compat/] [uitron/] [current/] [include/] [uit_objs.hxx] - Blame information for rev 786

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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