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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_COMPAT_UITRON_UIT_TYPE_H
2
#define CYGONCE_COMPAT_UITRON_UIT_TYPE_H
3
//===========================================================================
4
//
5
//      uit_type.h
6
//
7
//      uITRON specific data types as required by the API
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 specific data types as required by the API
48
// Description: 
49
//
50
//####DESCRIPTIONEND####
51
//
52
//===========================================================================
53
 
54
#include <pkgconf/uitron.h>             // uITRON setup CYGNUM_UITRON_SEMAS
55
                                        // CYGPKG_UITRON et al
56
 
57
#ifdef CYGPKG_UITRON
58
 
59
// ------------------------------------------------------------------------
60
// uITRON types
61
//
62
 
63
// from this section of the uITRON 3.02 manual:
64
// ***********************************************************************
65
// ***    6.4 Data Types                                               ***
66
// ***********************************************************************
67
//
68
// ***  General-Purpose Data Types ***************************************
69
 
70
typedef cyg_int8    B;          // signed 8-bit integer
71
typedef cyg_int16   H;          // signed 16-bit integer
72
typedef cyg_int32   W;          // signed 32-bit integer
73
typedef cyg_uint8   UB;         // unsigned 8-bit integer
74
typedef cyg_uint16  UH;         // unsigned 16-bit integer
75
typedef cyg_uint32  UW;         // unsigned 32-bit integer
76
                                // 
77
typedef cyg_uint32  VW;         // unpredictable data type (32-bit size)
78
typedef cyg_uint16  VH;         // unpredictable data type (16-bit size)
79
typedef cyg_uint8   VB;         // unpredictable data type (8-bit size)
80
 
81
typedef void *      VP;         // pointer to an unpredictable data type
82
 
83
typedef CYG_ADDRWORD FP;        // program start address
84
 
85
// * The difference between VB, VH and VW and B, H and W is that only the
86
//   number of bits is known for the former, not the data type of the
87
//   contents.  The latter clearly represent integers.
88
//
89
// ***  Data Types Dependent on ITRON Specification ***
90
//
91
// In order to clarify the meanings of certain parameters, the following
92
// names are used for data types which appear frequently and/or have
93
// special meanings.
94
 
95
typedef cyg_int32  INT; // Signed integer (bit width of processor)
96
typedef cyg_uint32 UINT;   // Unsigned integer (bit width of processor)
97
typedef cyg_int32  BOOL;   // Boolean value.  TRUE (1) or FALSE (0).
98
typedef cyg_uint16 FN;     // Function code.  Signed integer.  Maximum 2 bytes.
99
typedef INT        ID;     // Object ID number (???id)
100
typedef INT        BOOL_ID;// Boolean value or ID number
101
typedef INT        HNO;    // Handler number
102
typedef INT        RNO;    // Rendezvous number
103
typedef INT        NODE;   // Node Number.  Usually a signed integer.
104
typedef UINT       ATR;    // Object or handler attribute.  An unsigned integer.
105
typedef INT        ER;     // Error code.  A signed integer.
106
typedef INT        PRI;    // Task priority.  A signed integer.
107
typedef UB         T_MSG;  // Message packet data structure used for mailboxes
108
typedef INT        TMO;    // Timeout value.  A signed integer.
109
                           // TMO_POL = 0 indicates polling,
110
                           // while TMO_FEVR = -1 indicates wait forever.
111
 
112
typedef cyg_uint64 CYGTM;
113
typedef CYGTM      SYSTIME;// Data types used for specifying times.
114
typedef CYGTM      CYCTIME;// Often split into upper and lower sections.
115
typedef CYGTM      ALMTIME;// For details, see the chapter giving system
116
typedef CYGTM      DLYTIME;// call descriptions;.
117
 
118
// ***********************************************************************
119
// ***    6.7 Error Codes                                              ***
120
// ***********************************************************************
121
 
122
enum {
123
//------------------------------------------------------
124
//Mnemonic Value      Description
125
//------------------------------------------------------
126
E_OK     = 0,      // Normal completion
127
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
128
E_SYS    = (-5),   // System error
129
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
130
E_NOMEM  = (-10),  // Insufficient memory
131
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
132
E_NOSPT  = (-17),  // Feature not supported
133
E_INOSPT = (-18),  // Feature not supported by ITRON/FILE specification
134
E_RSFN   = (-20),  // Reserved function code number
135
E_RSATR  = (-24),  // Reserved attribute
136
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
137
E_PAR    = (-33),  // Parameter error
138
E_ID     = (-35),  // Invalid ID number
139
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
140
E_NOEXS  = (-52),  // Object does not exist
141
E_OBJ    = (-63),  // Invalid object state
142
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
143
E_MACV   = (-65),  // Memory access disabled or memory access violation
144
E_OACV   = (-66),  // Object access violation
145
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
146
E_CTX    = (-69),  // Context error
147
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
148
E_QOVR   = (-73),  // Queuing or nesting overflow
149
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
150
E_DLT    = (-81),  // Object being waited for was deleted
151
// - - - - - - - - // - - - - - - - - - - - - - - - - - -
152
E_TMOUT  = (-85),  // Polling failure or timeout exceeded
153
E_RLWAI  = (-86),  // WAIT state was forcibly released
154
// - - - - - - - - // - - - - - - - - - - - - - - - - - - -
155
#if 0 // CONNECTION FUNCTIONS ARE NOT SUPPORTED
156
EN_NOND  = (-113), // Target node does not exist or cannot be accessed
157
EN_OBJNO = (-114), // Specifies an object number which could not be
158
                   // accessed on the target node
159
EN_PROTO = (-115), // Protocol not supported on target node
160
EN_RSFN  = (-116), // System call or function not supported on target node
161
EN_COMM  = (-117), // No response from target node
162
EN_RLWAI = (-118), // Connection function response wait state was forcibly
163
                   // released
164
EN_PAR   = (-119), // A value outside the range supported by the target
165
                   // node and/or transmission packet format was specified
166
                   // as a parameter
167
EN_RPAR  = (-120), // A value outside the range supported by the issuing
168
                   // node and/or transmission packet format was returned
169
                   // as a return parameter
170
EN_CTXID = (-121), // An object on another node was specified to a system
171
                   // call issued from a task in dispatch disabled state
172
                   // or from a task-independent portion
173
EN_EXEC  = (-122), // System call could not be executed due to
174
                   // insufficient resources on the target node
175
EN_NOSPT = (-123), // Connection function not supported
176
#endif // 0 CONNECTION FUNCTIONS ARE NOT SUPPORTED
177
// - - - - - - - - // - - - - - - - - - - - - - - - - - - -
178
};
179
 
180
 
181
// *******************************************************************
182
// ***    6.6 Common Constants and Data Structure Packet Formats   ***
183
// *******************************************************************
184
 
185
/* --- overall ----------------------- */
186
 
187
/* invalid address or pointer value */
188
#define NADR      ((void *)(-1)) 
189
 
190
enum {
191
        TRUE  =   1,    /* true */
192
        FALSE =   0,    /* false */
193
};
194
 
195
/*    TMO tmout:   */
196
enum {
197
        TMO_POL  =    0,    /* polling */
198
        TMO_FEVR =  (-1)    /* wait forever */
199
};
200
 
201
/* --- for task management functions ----------------------- */
202
 
203
// cre_tsk:
204
        typedef struct t_ctsk {
205
                VP    exinf;     /* extended information */
206
                ATR   tskatr;    /* task attributes */
207
                FP    task;      /* task start address */
208
                PRI   itskpri;   /* initial task priority */
209
                INT   stksz;     /* stack size */
210
                // ...
211
            /* additional information may be included depending on the
212
               implementation */
213
                // ...
214
        } T_CTSK;
215
 
216
//    tskatr:
217
enum {
218
        TA_ASM    = 0x00,     /* program written in assembly language */
219
        TA_HLNG   = 0x01,     /* program written in high-level language */
220
        TA_COP0   = 0x8000,   /* uses coprocessor having ID = 0 */
221
        TA_COP1   = 0x4000,   /* uses coprocessor having ID = 1 */
222
        TA_COP2   = 0x2000,   /* uses coprocessor having ID = 2 */
223
        TA_COP3   = 0x1000,   /* uses coprocessor having ID = 3 */
224
        TA_COP4   = 0x0800,   /* uses coprocessor having ID = 4 */
225
        TA_COP5   = 0x0400,   /* uses coprocessor having ID = 5 */
226
        TA_COP6   = 0x0200,   /* uses coprocessor having ID = 6 */
227
        TA_COP7   = 0x0100,   /* uses coprocessor having ID = 7 */
228
};
229
 
230
//    tskid:
231
enum {
232
        TSK_SELF  = 0,  /* task specifies itself */
233
        /* FALSE     = 0, */ /* indicates a task-independent portion (return
234
                          parameters only) */
235
};
236
//    tskpri:
237
enum {
238
        TPRI_INI  = 0,  /* specifies the initial priority on task startup
239
                          (chg_pri) */
240
        TPRI_RUN  = 0,  /* specifies the highest priority during execution
241
                          (rot_rdq) */
242
};
243
    /* ref_tsk */
244
        typedef struct t_rtsk {
245
                VP     exinf;     /* extended information */
246
                PRI    tskpri;    /* current priority */
247
                UINT   tskstat;   /* task state */
248
            /* the following are represent extended features of support
249
               [level X] (implementation-dependent) */
250
#if 0 // NOT SUPPORTED
251
                UINT   tskwait;   /* cause of wait */
252
                ID     wid;       /* ID of object being waited for */
253
                INT    wupcnt;    /* wakeup request count */
254
                INT    suscnt;    /* SUSPEND request count */
255
                ATR    tskatr;    /* task attributes */
256
                FP     task;      /* task start address */
257
                PRI    itskpri;   /* initial task priority */
258
                INT    stksz;     /* stack size */
259
                        // ...
260
#endif
261
        } T_RTSK;
262
 
263
//    tskstat:
264
enum {
265
        TTS_RUN   = 0x01,  /* RUN */
266
        TTS_RDY   = 0x02,  /* READY */
267
        TTS_WAI   = 0x04,  /* WAIT */
268
        TTS_SUS   = 0x08,  /* SUSPEND */
269
        TTS_WAS   = 0x0C,  /* WAIT-SUSPEND */
270
        TTS_DMT   = 0x10,  /* DORMANT */
271
};
272
//    tskwait:
273
enum {
274
        TTW_SLP   = 0x0001,  /* wait due to slp_tsk or tslp_tsk */
275
        TTW_DLY   = 0x0002,  /* wait due to dly_tsk */
276
        TTW_NOD   = 0x0008,  /* connection function response wait */
277
        TTW_FLG   = 0x0010,  /* wait due to wai_flg or twai_flg */
278
        TTW_SEM   = 0x0020,  /* wait due to wai_sem or twai_sem */
279
        TTW_MBX   = 0x0040,  /* wait due to rcv_msg or trcv_msg */
280
        TTW_SMBF  = 0x0080,  /* wait due to snd_mbf or tsnd_mbf */
281
        TTW_MBF   = 0x0100,  /* wait due to rcv_mbf or trcv_mbf */
282
        TTW_CAL   = 0x0200,  /* wait for rendezvous call */
283
        TTW_ACP   = 0x0400,  /* wait for rendezvous accept */
284
        TTW_RDV   = 0x0800,  /* wait for rendezvous completion */
285
        TTW_MPL   = 0x1000,  /* wait due to get_blk or tget_blk */
286
        TTW_MPF   = 0x2000,  /* wait due to get_blf or tget_blf */
287
};
288
         /* Since the task states given by tskstat and tskwait are expressed
289
            by bit correspondences, they are convenient when looking for OR
290
            conditions (such as whether a task is in WAIT or READY state).
291
            */
292
 
293
/* --- for semaphore functions ----------------------- */
294
 
295
    /* cre_sem */
296
        typedef struct t_csem {
297
                VP    exinf;    /* extended information */
298
                ATR   sematr;   /* semaphore attributes */
299
            /* Following is the extended function for [level X]. */
300
                INT   isemcnt;   /* initial semaphore count */
301
            /*  INT   maxsem;  NOT SUPPORTED maximum semaphore count */
302
                        // ...
303
            /* additional information may be included depending on the
304
               implementation */
305
                        // ...
306
        } T_CSEM;
307
 
308
    /* ref_sem */
309
        typedef struct t_rsem {
310
                VP      exinf;    /* extended information */
311
                BOOL_ID wtsk;     /* indicates whether or not there is a
312
                                     waiting task */
313
                INT     semcnt;   /* current semaphore count */
314
                        // ...
315
            /* additional information may be included depending on the
316
               implementation */
317
                        // ...
318
        } T_RSEM;
319
 
320
/* --- for eventflag functions ----------------------- */
321
 
322
    /* cre_flg */
323
        typedef struct t_cflg {
324
                VP     exinf;     /* extended information */
325
                ATR    flgatr;    /* eventflag attribute */
326
                UINT   iflgptn;   /* initial eventflag */
327
                        // ...
328
            /* additional information may be included depending on the
329
               implementation */
330
                        // ...
331
        } T_CFLG;
332
 
333
//    flgatr:
334
enum {
335
        TA_WSGL   = 0x00,  /* multiple tasks are not allowed to wait (Wait
336
                                Single Task) */
337
        TA_WMUL   = 0x08,  /* multiple tasks are allowed to wait (Wait
338
                                Multiple Task) */
339
};
340
//    wfmode:
341
enum {
342
        TWF_ANDW   = 0x00,  /* AND wait */
343
        TWF_ORW    = 0x02,  /* OR wait */
344
        TWF_CLR    = 0x01,  /* clear specification */
345
};
346
    /* ref_flg */
347
        typedef struct t_rflg {
348
                VP        exinf;      /* extended information */
349
                BOOL_ID   wtsk;       /* indicates whether or not there is a
350
                                         waiting task */
351
                UINT      flgptn;     /* eventflag bit pattern */
352
                        // ...
353
            /* additional information may be included depending on the
354
               implementation */
355
                        // ...
356
        } T_RFLG;
357
 
358
/* --- for mailbox functions ----------------------- */
359
 
360
   /* cre_mbx */
361
        typedef struct t_cmbx {
362
                VP    exinf;    /* extended information */
363
                ATR   mbxatr;   /* mailbox attributes */
364
            /* Following is implementation-dependent function */
365
            /*  INT   bufcnt; NOT SUPPORTED ring buffer size IS FIXED */
366
                        // ...
367
            /* additional information may be included depending on the
368
               implementation */
369
                        // ...
370
        } T_CMBX;
371
 
372
//    mbxatr:
373
enum {
374
        TA_TFIFO   = 0x00,  /* waiting tasks are handled by FIFO */
375
        TA_TPRI    = 0x01,  /* waiting tasks are handled by priority */
376
        TA_MFIFO   = 0x00,  /* messages are handled by FIFO */
377
        TA_MPRI    = 0x02,  /* messages are handled by priority */
378
};
379
 
380
    /* ref_mbx */
381
        typedef struct t_rmbx {
382
                VP        exinf;    /* extended information */
383
                BOOL_ID   wtsk;     /* indicates whether or not there is a
384
                                       waiting task */
385
                T_MSG*    pk_msg;   /* message to be sent next */
386
                        // ...
387
            /* additional information may be included depending on the
388
               implementation */
389
                        // ...
390
        } T_RMBX;
391
 
392
/* --- for messagebuffer functions ----------------------- */
393
 
394
#if 0 // NOT SUPPORTED
395
    /* cre_mbf */
396
        typedef struct t_cmbf {
397
                VP    exinf;    /* extended information */
398
                ATR   mbfatr;   /* messagebuffer attributes */
399
                INT   bufsz;    /* messagebuffer size */
400
                INT   maxmsz;   /* maximum size of messages */
401
                        // ...
402
            /* additional information may be included depending on the
403
               implementation */
404
                        // ...
405
        } T_CMBF;
406
 
407
//    mbfatr:
408
//    mbfid:
409
enum {
410
        TMBF_OS  = (-4),   /* messagebuffer used for OS error log */
411
        TMBF_DB  = (-3),   /* messagebuffer used for debugging */
412
};
413
    /* ref_mbf */
414
        typedef struct t_rmbf {
415
                VP        exinf;     /* extended information */
416
                BOOL_ID   wtsk;      /* indicates whether or not there is a
417
                                        task waiting to receive a message */
418
                BOOL_ID   stsk;      /* indicates whether or not there is a
419
                                        task waiting to send a message */
420
                INT       msgsz;     /* size of message to be sent next */
421
                INT       frbufsz;   /* size of free buffer */
422
                        // ...
423
            /* additional information may be included depending on the
424
               implementation */
425
                        // ...
426
        } T_RMBF;
427
 
428
#endif
429
/* --- for port or rendezvous functions ----------------------- */
430
 
431
#if 0 // NOT SUPPORTED
432
 
433
    /* cre_por */
434
        typedef struct t_cpor {
435
                VP    exinf;     /* extended information */
436
                ATR   poratr;    /* port attributes */
437
                INT   maxcmsz;   /* maximum call message size */
438
                INT   maxrmsz;   /* maximum reply message size */
439
                        // ...
440
            /* additional information may be included depending on the
441
               implementation */
442
                        // ...
443
        } T_CPOR;
444
 
445
//    poratr:
446
enum {
447
        TA_NULL  = 0,  /* specifies no particular attributes */
448
         /* TA_NULL should be used in place of zeroes to turn off all
449
            attribute features. */
450
};
451
    /* ref_por */
452
        typedef struct t_rpor {
453
                VP        exinf;   /* extended information */
454
                BOOL_ID   wtsk;    /* indicates whether or not there is a task
455
                                      waiting to call a rendezvous */
456
                BOOL_ID   atsk;    /* indicates whether or not there is a task
457
                                      waiting to accept a rendezvous */
458
                        // ...
459
            /* additional information may be included depending on the
460
               implementation */
461
                        // ...
462
        } T_RPOR;
463
#endif
464
 
465
/* --- for interrupt management functions ----------------------- */
466
 
467
#if 0 // NOT SUPPORTED
468
    /* def_int */
469
        typedef struct t_dint {
470
                ATR   intatr;   /* interrupt handler attributes */
471
                FP    inthdr;   /* interrupt handler address */
472
                        // ...
473
            /* additional information may be included depending on the
474
               implementation */
475
                        // ...
476
        } T_DINT;
477
#endif
478
 
479
/* --- for memorypool management functions ----------------------- */
480
 
481
    /* cre_mpl */
482
        typedef struct t_cmpl {
483
                VP    exinf;    /* extended information */
484
                ATR   mplatr;   /* memorypool attributes */
485
                INT   mplsz;    /* memorypool size */
486
                        // ...
487
            /* additional information may be included depending on the
488
               implementation */
489
                        // ...
490
        } T_CMPL;
491
 
492
//    mplatr:
493
//    mplid:
494
enum {
495
        TMPL_OS  = (-4)   /* memorypool used by OS */
496
};
497
    /* ref_mpl */
498
        typedef struct t_rmpl {
499
                VP        exinf;    /* extended information */
500
                BOOL_ID   wtsk;     /* indicates whether or not there are
501
                                       waiting tasks */
502
                INT       frsz;     /* total size of free memory */
503
                INT       maxsz;    /* size of largest contiguous memory */
504
                        // ...
505
            /* additional information may be included depending on the
506
               implementation */
507
                        // ...
508
        } T_RMPL;
509
 
510
    /* cre_mpf */
511
        typedef struct t_cmpf {
512
                VP    exinf;     /* extended information */
513
                ATR   mpfatr;    /* memorypool attributes */
514
                INT   mpfcnt;    /* block count for entire memorypool */
515
                INT   blfsz;     /* fixed-size memory block size */
516
                        // ...
517
            /* additional information may be included depending on the
518
               implementation */
519
                        // ...
520
        } T_CMPF;
521
 
522
//    mpfatr:
523
    /* ref_mpf */
524
        typedef struct t_rmpf {
525
                VP        exinf;    /* extended information */
526
                BOOL_ID   wtsk;     /* indicates whether or not there are
527
                                       waiting tasks */
528
                INT       frbcnt;   /* free block count */
529
            /* additional information may be included depending on the
530
               implementation */
531
                INT       numbcnt;  /* total number of blocks */
532
                INT       bsize;    /* block size */
533
 
534
        } T_RMPF;
535
 
536
/* --- for time management functions ----------------------- */
537
 
538
#if 0 // native definition is at head of this file
539
    /* example for 32-bit CPUs */
540
        typedef struct t_systime {
541
                H    utime;   /* upper 16 bits */
542
                UW   ltime;   /* lower 32 bits */
543
        } SYSTIME, CYCTIME, ALMTIME;
544
 
545
    /* example for 16-bit CPUs */
546
        typedef struct t_systime {
547
                H    utime;   /* upper 16 bits */
548
                UH   mtime;   /* middle 16 bits */
549
                UH   ltime;   /* lower 16 bits */
550
        } SYSTIME, CYCTIME, ALMTIME;
551
#endif
552
         /* Member configuration depends on the bit width of the processor and
553
            on the implementation.  A total of 48 bits is recommended. */
554
 
555
    /* def_cyc */
556
        typedef struct t_dcyc {
557
                VP        exinf;    /* extended information */
558
                ATR       cycatr;   /* cyclic handler attributes */
559
                FP        cychdr;   /* cyclic handler address */
560
                UINT      cycact;   /* cyclic handler activation */
561
                CYCTIME   cyctim;   /* cyclic startup period */
562
        } T_DCYC;
563
 
564
//    cycact:
565
enum {
566
        TCY_OFF   = 0x00,  /* do not invoke cyclic handler */
567
        TCY_ON    = 0x01,  /* invoke cyclic handler */
568
        TCY_INT   = 0x02,  /* initialize cycle count */
569
        /* Following changed from TCY_INT to TCY_INI to match
570
           description in the body of the standard.  I assume TCY_INT
571
           is a hypercorrection/typo; keep both */
572
        TCY_INI   = 0x02,  /* initialize cycle count */
573
};
574
    /* ref_cyc */
575
        typedef struct t_rcyc {
576
                VP        exinf;    /* extended information */
577
                CYCTIME   lfttim;   /* time left before next handler startup */
578
                UINT      cycact;   /* cyclic handler activation */
579
                        // ...
580
            /* additional information may be included depending on the
581
               implementation */
582
                        // ...
583
        } T_RCYC;
584
 
585
    /* def_alm */
586
        typedef struct t_dalm {
587
                VP        exinf;    /* extended information */
588
                ATR       almatr;   /* alarm handler attributes */
589
                FP        almhdr;   /* alarm handler address */
590
                UINT      tmmode;   /* start time specification mode */
591
                ALMTIME   almtim;   /* handler startup time */
592
        } T_DALM;
593
 
594
//    tmmode:
595
enum {
596
        TTM_ABS   = 0x00,  /* specified as an absolute time */
597
        TTM_REL   = 0x01,  /* specified as a relative time */
598
};
599
    /* ref_alm */
600
        typedef struct t_ralm {
601
                VP        exinf;    /* extended information */
602
                ALMTIME   lfttim;   /* time left before next handler startup */
603
                        // ...
604
            /* additional information may be included depending on the
605
               implementation */
606
                        // ...
607
        } T_RALM;
608
 
609
/* --- for system management functions ----------------------- */
610
 
611
    /* get_ver */
612
        typedef struct t_ver {
613
                UH   maker;     /* vendor */
614
                UH   id;        /* format number */
615
                UH   spver;     /* specification version */
616
                UH   prver;     /* product version */
617
                UH   prno[4];   /* product control information */
618
                UH   cpu;       /* CPU information */
619
                UH   var;       /* variation descriptor */
620
        } T_VER;
621
 
622
    /* ref_sys */
623
        typedef struct t_rsys {
624
                INT   sysstat;   /* system state */
625
                        // ...
626
            /* additional information may be included depending on the
627
               implementation */
628
                        // ...
629
        } T_RSYS;
630
 
631
//    sysstat:
632
enum {
633
        TSS_TSK   = 0,  /* normal state in which dispatching is enabled during
634
                          task portion execution */
635
        TSS_DDSP  = 1,   /* state after dis_dsp has been executed during task
636
                          portion execution (dispatch disabled) */
637
        TSS_LOC   = 3,   /* state after loc_cpu has been executed during task
638
                          portion execution (interrupt and dispatch disabled)
639
                          */
640
        TSS_INDP  = 4,   /* state during execution of task-independent portions
641
                          (interrupt and timer handlers) */
642
};
643
    /* ref_cfg */
644
        typedef struct t_rcfg {
645
            /* details concerning members are implementation dependent */
646
        } T_RCFG;
647
 
648
#if 0 // NOT SUPPORTED
649
    /* def_svc */
650
        typedef struct t_dsvc {
651
                ATR   svcatr;   /* extended SVC handler attributes */
652
                FP    svchdr;   /* extended SVC handler address */
653
                        // ...
654
            /* additional information may be included depending on the
655
               implementation */
656
                        // ...
657
        } T_DSVC;
658
 
659
    /* def_exc */
660
        typedef struct t_dexc {
661
                ATR   excatr;   /* exception handler attributes */
662
                FP    exchdr;   /* exception handler address */
663
                        // ...
664
            /* additional information may be included depending on the
665
               implementation */
666
                        // ...
667
        } T_DEXC;
668
#endif
669
 
670
/* --- for network management functions ----------------------- */
671
 
672
#if 0 // NOT SUPPORTED
673
//    NODE srcnode, dstnode, node:
674
enum {
675
        TND_SELF  = 0,     /* specifies the local node */
676
        TND_OTHR  = (-1)   /* specifies default remote node */
677
};
678
#endif
679
/* ------------------------------------------------------ */
680
 
681
 
682
 
683
#endif // CYGPKG_UITRON
684
 
685
#endif // CYGONCE_COMPAT_UITRON_UIT_TYPE_H
686
// EOF uit_type.h

powered by: WebSVN 2.1.0

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