Added 'Resident' field to ensure that the handler is included in the
[AROS.git] / rom / exec / exec_intern.h
blob618b6ac7e4a3c07ae2fbc93c7c3d8b0e249dfbd1
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Private data belonging to exec.library
6 Lang:
7 */
8 #ifndef __EXEC_INTERN_H__
9 #define __EXEC_INTERN_H__
11 /* This is a short file that contains a few things every Exec function needs */
13 #include <aros/debug.h> /* Needed for aros_print_not_implemented macro */
14 #include <aros/system.h>
15 #include <aros/libcall.h>
16 #include <exec/execbase.h>
17 #include <proto/exec.h>
19 #include <exec_platform.h>
21 #define ALERT_BUFFER_SIZE 2048
23 /* Internals of this structure are host-specific, we don't know them here */
24 struct HostInterface;
26 /* A private portion of ExecBase */
27 struct IntExecBase
29 struct ExecBase pub;
30 struct List ResetHandlers; /* Reset handlers list */
31 struct MinList AllocMemList; /* Mungwall allocations list */
32 struct SignalSemaphore MemListSem; /* Memory list protection semaphore */
33 struct SignalSemaphore LowMemSem; /* Lock for single-threading low memory handlers */
34 APTR KernelBase; /* kernel.resource base */
35 struct Library *DebugBase; /* debug.library base */
36 ULONG PageSize; /* Memory page size */
37 ULONG IntFlags; /* Internal flags, see below */
38 struct MsgPort *ServicePort; /* Message port for service task */
39 struct MinList TaskStorageSlots; /* List of free slots, always one element with next slot */
40 struct Exec_PlatformData PlatformData; /* Platform-specific stuff */
41 char AlertBuffer[ALERT_BUFFER_SIZE]; /* Buffer for alert text */
44 #define PrivExecBase(base) ((struct IntExecBase *)base)
45 #define PD(base) PrivExecBase(base)->PlatformData
46 #define KernelBase PrivExecBase(SysBase)->KernelBase
47 #define DebugBase PrivExecBase(SysBase)->DebugBase
49 /* IntFlags */
50 #define EXECF_MungWall 0x0001 /* This flag can't be changed at runtime */
51 #define EXECF_StackSnoop 0x0002
53 /* Additional private task states */
54 #define TS_SERVICE 128
56 /* Puddle size, in slots. Must be at least 1 */
57 #define TASKSTORAGEPUDDLE 16
59 #if UseLVOs
60 extern void __AROS_InitExecBase (void);
61 #endif
63 struct ExecBase *PrepareExecBase(struct MemHeader *mh, struct TagItem *tags);
64 void InitExecBase(struct ExecBase *SysBase, ULONG negsize, struct TagItem *msg);
65 struct ExecBase *PrepareExecBaseMove(struct ExecBase *oldSysBase);
66 BOOL Exec_PreparePlatform(struct Exec_PlatformData *pdata, struct TagItem *tags);
68 void InitKickTags(struct ExecBase *SysBase);
69 UWORD GetSysBaseChkSum(struct ExecBase *sysbase);
70 void SetSysBaseChkSum(void);
71 BOOL IsSysBaseValid(struct ExecBase *sysbase);
73 IPTR cpu_SuperState();
75 void ServiceTask(struct ExecBase *SysBase);
77 #endif /* __EXEC_INTERN_H__ */