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

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [FMTK/] [source/] [kernel/] [types.h] - Blame information for rev 23

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 23 robfinch
#ifndef TYPES_H
2
#define TYPES_H
3
 
4
typedef unsigned int uint;
5
typedef __int16 hTCB;
6
typedef __int8 hJCB;
7
typedef __int16 hMBX;
8
typedef __int16 hMSG;
9
 
10
typedef struct tagMSG align(32) {
11
        unsigned __int16 link;
12
        unsigned __int16 retadr;    // return address
13
        unsigned __int16 tgtadr;    // target address
14
        unsigned __int16 type;
15
        unsigned int d1;            // payload data 1
16
        unsigned int d2;            // payload data 2
17
        unsigned int d3;            // payload data 3
18
} MSG;
19
 
20
typedef struct _tagJCB align(2048)
21
{
22
    struct _tagJCB *iof_next;
23
    struct _tagJCB *iof_prev;
24
    char UserName[32];
25
    char path[256];
26
    char exitRunFile[256];
27
    char commandLine[256];
28
    unsigned __int32 *pVidMem;
29
    unsigned __int32 *pVirtVidMem;
30
    unsigned __int16 VideoRows;
31
    unsigned __int16 VideoCols;
32
    unsigned __int16 CursorRow;
33
    unsigned __int16 CursorCol;
34
    unsigned __int32 NormAttr;
35
    __int8 KeyState1;
36
    __int8 KeyState2;
37
    __int8 KeybdWaitFlag;
38
    __int8 KeybdHead;
39
    __int8 KeybdTail;
40
        __int8 KeybdBufSz;
41
    unsigned __int8 KeybdBuf[64];
42
    hJCB number;
43
    hTCB tasks[8];
44
    hJCB next;
45
} JCB;
46
 
47
struct tagMBX;
48
 
49
typedef struct _tagTCB align(4096) {
50
    // exception storage area
51
        int regs[64];
52
        int cregs[16];
53
        int sregs[8];
54
        int sregs_lmt[8];
55
        int pregs;
56
        // interrupt storage
57
        int iregs[64];
58
        int icregs[16];
59
        int isregs[8];
60
        int isregs_lmt[8];
61
        int ipregs;
62
 
63
        int resv[62];
64
 
65
        hTCB next;
66
        hTCB prev;
67
        hTCB mbq_next;
68
        hTCB mbq_prev;
69
        int *sys_stack;
70
        int *bios_stack;
71
        int *stack;
72
        __int64 timeout;
73
        MSG msg;
74
        hMBX hMailboxes[4]; // handles of mailboxes owned by task
75
        hMBX hWaitMbx;      // handle of mailbox task is waiting at
76
        hTCB number;
77
        __int8 priority;
78
        __int8 status;
79
        __int8 affinity;
80
        hJCB hJob;
81
        __int64 startTick;
82
        __int64 endTick;
83
        __int64 ticks;
84
        int exception;
85
} TCB;
86
 
87
typedef struct tagMBX align(64) {
88
    hMBX link;
89
        hJCB owner;             // hJcb of owner
90
        hTCB tq_head;
91
        hTCB tq_tail;
92
        hMSG mq_head;
93
        hMSG mq_tail;
94
        char mq_strategy;
95
        byte resv[2];
96
        uint tq_count;
97
        uint mq_size;
98
        uint mq_count;
99
        uint mq_missed;
100
} MBX;
101
 
102
typedef struct tagALARM {
103
        struct tagALARM *next;
104
        struct tagALARM *prev;
105
        MBX *mbx;
106
        MSG *msg;
107
        uint BaseTimeout;
108
        uint timeout;
109
        uint repeat;
110
        byte resv[8];           // padding to 64 bytes
111
} ALARM;
112
 
113
#endif

powered by: WebSVN 2.1.0

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