added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / compiler / include / exec / execbase.h
blobc445b2f420d83baafd410d266d580c5c232a3d62
1 #ifndef EXEC_EXECBASE_H
2 #define EXEC_EXECBASE_H
4 /*
5 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: structure of exec.library
9 Lang: english
12 #ifndef EXEC_INTERRUPTS_H
13 # include <exec/interrupts.h>
14 #endif
15 #ifndef EXEC_LIBRARIES_H
16 # include <exec/libraries.h>
17 #endif
18 #ifndef EXEC_LISTS_H
19 # include <exec/lists.h>
20 #endif
21 #ifndef EXEC_TASKS_H
22 # include <exec/tasks.h>
23 #endif
25 /* Most fields are PRIVATE */
26 struct ExecBase
28 /* Standard Library Structure */
29 struct Library LibNode;
31 /* System Constants */
32 UWORD SoftVer; /* OBSOLETE */
33 WORD LowMemChkSum;
34 IPTR ChkBase;
35 APTR ColdCapture;
36 APTR CoolCapture;
37 APTR WarmCapture;
38 APTR SysStkUpper; /* System Stack Bounds */
39 APTR SysStkLower;
40 IPTR MaxLocMem; /* Chip Memory Pointer */
41 APTR DebugEntry;
42 APTR DebugData;
43 APTR AlertData;
44 APTR MaxExtMem; /* Extended Memory Pointer (may be NULL) */
45 UWORD ChkSum; /* SoftVer to MaxExtMem */
47 /* Interrupts */
48 struct IntVector IntVects[16];
50 /* System Variables */
51 struct Task * ThisTask; /* Pointer to currently running task
52 (readable) */
53 ULONG IdleCount;
54 ULONG DispCount;
55 UWORD Quantum; /* # of ticks, a task may run */
56 UWORD Elapsed; /* # of ticks, the current task has run */
57 UWORD SysFlags;
58 BYTE IDNestCnt;
59 BYTE TDNestCnt;
60 UWORD AttnFlags; /* Attention Flags (see below) (readable) */
61 UWORD AttnResched;
62 APTR ResModules;
63 APTR TaskTrapCode;
64 APTR TaskExceptCode;
65 APTR TaskExitCode;
66 ULONG TaskSigAlloc;
67 UWORD TaskTrapAlloc;
69 /* PRIVATE Lists */
70 struct List MemList;
71 struct List ResourceList;
72 struct List DeviceList;
73 struct List IntrList;
74 struct List LibList;
75 struct List PortList;
76 struct List TaskReady; /* Tasks that are ready to run */
77 struct List TaskWait; /* Tasks that wait for some event */
78 struct SoftIntList SoftInts[5];
80 /* Miscellaneous Stuff */
81 LONG LastAlert[4];
83 UBYTE VBlankFrequency; /* (readable) */
84 UBYTE PowerSupplyFrequency; /* (readable) */
85 /* AROS PRIVATE: VBlankFreq * PowerSupplyFreq = Timer Tick Rate */
86 struct List SemaphoreList;
88 /* Kickstart */
89 APTR KickMemPtr;
90 APTR KickTagPtr;
91 APTR KickCheckSum;
93 /* Miscellaneous Stuff */
94 UWORD ex_Pad0; /* PRIVATE */
95 IPTR ex_LaunchPoint; /* PRIVATE */
96 APTR ex_RamLibPrivate;
97 ULONG ex_EClockFrequency; /* (readable) */
98 ULONG ex_CacheControl; /* PRIVATE */
99 ULONG ex_TaskID;
100 ULONG ex_Reserved1[5];
101 APTR ex_MMULock; /* PRIVATE */
102 ULONG ex_Reserved2[3];
103 struct MinList ex_MemHandlers;
104 APTR ex_MemHandler; /* PRIVATE */
106 /* Additional fields for AROS */
107 struct Library * DebugAROSBase;
108 void * PlatformData; /* different for all platforms */
111 /* AttnFlags */
112 /* Processors */
113 #define AFB_68010 0
114 #define AFF_68010 (1L<<0)
115 #define AFB_68020 1
116 #define AFF_68020 (1L<<1)
117 #define AFB_68030 2
118 #define AFF_68030 (1L<<2)
119 #define AFB_68040 3
120 #define AFF_68040 (1L<<3)
121 /* Co-Processors */
122 #define AFB_68881 4
123 #define AFF_68881 (1L<<4)
124 #define AFB_68882 5
125 #define AFF_68882 (1L<<5)
126 #define AFB_FPU40 6
127 #define AFF_FPU40 (1L<<6)
128 #define AFB_PRIVATE 15 /* PRIVATE */
129 #define AFF_PRIVATE (1L<<15)
131 /* Cache */
132 #define CACRF_EnableI (1L<<0)
133 #define CACRF_FreezeI (1L<<1)
134 #define CACRF_ClearI (1L<<3)
135 #define CACRF_IBE (1L<<4)
136 #define CACRF_EnableD (1L<<8)
137 #define CACRF_FreezeD (1L<<9)
138 #define CACRF_ClearD (1L<<11)
139 #define CACRF_DBE (1L<<12)
140 #define CACRF_WriteAllocate (1L<<13)
141 #define CACRF_EnableE (1L<<30)
142 #define CACRF_CopyBack (1L<<31)
144 /* DMA */
145 #define DMA_Continue (1L<<1)
146 #define DMA_NoModify (1L<<2)
147 #define DMA_ReadFromRAM (1L<<3)
149 #endif /* EXEC_EXECBASE_H */