EXEC Types Reference

Per-function autodoc pages link to these types via the type name (e.g., [List](types-exec.md#list)).

Clickable inner types: inside each struct definition, field types that are themselves structs/unions/enums are clickable hyperlinks to their own definitions.

Contents

devices.h


struct Device

Source: exec/devices.h


struct Device { 
    struct Library dd_Library;
};

struct Unit

Source: exec/devices.h


struct Unit {
    struct MsgPort unit_MsgPort; /* queue for unprocessed messages */
                    /* instance of msgport is recommended */
    UBYTE   unit_flags;
    UBYTE   unit_pad;
    UWORD   unit_OpenCnt;       /* number of active opens */
};

execbase.h


struct ExecBase

Source: exec/execbase.h


struct ExecBase {
    struct Library LibNode; /* Standard library node */

/******** Static System Variables ********/

    UWORD   SoftVer;    /* kickstart release number (obs.) */
    WORD    LowMemChkSum;   /* checksum of 68000 trap vectors */
    ULONG   ChkBase;    /* system base pointer complement */
    APTR    ColdCapture;    /* coldstart soft capture vector */
    APTR    CoolCapture;    /* coolstart soft capture vector */
    APTR    WarmCapture;    /* warmstart soft capture vector */
    APTR    SysStkUpper;    /* system stack base   (upper bound) */
    APTR    SysStkLower;    /* top of system stack (lower bound) */
    ULONG   MaxLocMem;  /* top of chip memory */
    APTR    DebugEntry; /* global debugger entry point */
    APTR    DebugData;  /* global debugger data segment */
    APTR    AlertData;  /* alert data segment */
    APTR    MaxExtMem;  /* top of extended mem, or null if none */

    UWORD   ChkSum; /* for all of the above (minus 2) */

/****** Interrupt Related ***************************************/

    struct IntVector IntVects[16];

/****** Dynamic System Variables *************************************/

    struct Task *ThisTask; /* pointer to current task (readable) */

    ULONG   IdleCount;  /* idle counter */
    ULONG   DispCount;  /* dispatch counter */
    UWORD   Quantum;    /* time slice quantum */
    UWORD   Elapsed;    /* current quantum ticks */
    UWORD   SysFlags;   /* misc internal system flags */
    BYTE    IDNestCnt;  /* interrupt disable nesting count */
    BYTE    TDNestCnt;  /* task disable nesting count */

    UWORD   AttnFlags;  /* special attention flags (readable) */

    UWORD   AttnResched;    /* rescheduling attention */
    APTR    ResModules; /* resident module array pointer */
    APTR    TaskTrapCode;
    APTR    TaskExceptCode;
    APTR    TaskExitCode;
    ULONG   TaskSigAlloc;
    UWORD   TaskTrapAlloc;


/****** System Lists (private!) ********************************/

    struct List MemList;
    struct List ResourceList;
    struct List DeviceList;
    struct List IntrList;
    struct List LibList;
    struct List PortList;
    struct List TaskReady;
    struct List TaskWait;

    struct SoftIntList SoftInts[5];

/****** Other Globals *******************************************/

    LONG    LastAlert[4];

    /* these next two variables are provided to allow
    ** system developers to have a rough idea of the
    ** period of two externally controlled signals --
    ** the time between vertical blank interrupts and the
    ** external line rate (which is counted by CIA A's
    ** "time of day" clock).  In general these values
    ** will be 50 or 60, and may or may not track each
    ** other.  These values replace the obsolete AFB_PAL
    ** and AFB_50HZ flags.
    */
    UBYTE   VBlankFrequency;    /* (readable) */
    UBYTE   PowerSupplyFrequency;   /* (readable) */

    struct List SemaphoreList;

    /* these next two are to be able to kickstart into user ram.
    ** KickMemPtr holds a singly linked list of MemLists which
    ** will be removed from the memory list via AllocAbs.  If
    ** all the AllocAbs's succeeded, then the KickTagPtr will
    ** be added to the rom tag list.
    */
    APTR    KickMemPtr; /* ptr to queue of mem lists */
    APTR    KickTagPtr; /* ptr to rom tag queue */
    APTR    KickCheckSum;   /* checksum for mem and tags */

/****** V36 Exec additions start here **************************************/

    UWORD   ex_Pad0;        /* Private internal use */
    ULONG   ex_LaunchPoint;     /* Private to Launch/Switch */
    APTR    ex_RamLibPrivate;
    /* The next ULONG contains the system "E" clock frequency,
    ** expressed in Hertz.  The E clock is used as a timebase for
    ** the Amiga's 8520 I/O chips. (E is connected to "02").
    ** Typical values are 715909 for NTSC, or 709379 for PAL.
    */
    ULONG   ex_EClockFrequency; /* (readable) */
    ULONG   ex_CacheControl;    /* Private to CacheControl calls */
    ULONG   ex_TaskID;      /* Next available task ID */

    ULONG   ex_Reserved1[5];

    APTR    ex_MMULock;     /* private */

    ULONG   ex_Reserved2[3];

/****** V39 Exec additions start here **************************************/

    /* The following list and data element are used
     * for V39 exec's low memory handler...
     */
    struct MinList   ex_MemHandlers; /* The handler list */
    APTR    ex_MemHandler;      /* Private! handler pointer */
};

interrupts.h


struct IntVector

Source: exec/interrupts.h


struct IntVector {     /* For EXEC use ONLY! */
    APTR    iv_Data;
    VOID    (*iv_Code)();
    struct Node *iv_Node;
};

struct Interrupt

Source: exec/interrupts.h


struct Interrupt {
    struct Node is_Node;
    APTR    is_Data;            /* server data segment  */
    VOID    (*is_Code)();       /* server code entry    */
};

struct SoftIntList

Source: exec/interrupts.h


struct SoftIntList {     /* For EXEC use ONLY! */
    struct List sh_List;
    UWORD  sh_Pad;
};

io.h


struct IORequest

Source: exec/io.h


struct IORequest {
    struct Message io_Message;
    struct Device  *io_Device;     /* device node pointer  */
    struct Unit    *io_Unit;        /* unit (driver private)*/
    UWORD   io_Command;     /* device command */
    UBYTE   io_Flags;
    BYTE    io_Error;           /* error or warning num */
};

struct IOStdReq

Source: exec/io.h


struct IOStdReq {
    struct Message io_Message;
    struct Device  *io_Device;     /* device node pointer  */
    struct Unit    *io_Unit;        /* unit (driver private)*/
    UWORD   io_Command;     /* device command */
    UBYTE   io_Flags;
    BYTE    io_Error;           /* error or warning num */
    ULONG   io_Actual;          /* actual number of bytes transferred */
    ULONG   io_Length;          /* requested number bytes transferred*/
    APTR    io_Data;            /* points to data area */
    ULONG   io_Offset;          /* offset for block structured devices */
};

libraries.h


struct Library

Source: exec/libraries.h


struct Library {
    struct Node lib_Node;
    UBYTE   lib_Flags;
    UBYTE   lib_pad;
    UWORD   lib_NegSize;        /* number of bytes before library */
    UWORD   lib_PosSize;        /* number of bytes after library */
    UWORD   lib_Version;        /* major */
    UWORD   lib_Revision;       /* minor */
    APTR    lib_IdString;       /* ASCII identification */
    ULONG   lib_Sum;            /* the checksum itself */
    UWORD   lib_OpenCnt;        /* number of current opens */
};  /* Warning: size is not a longword multiple! */

lists.h


struct List

Source: exec/lists.h


struct List {
   struct Node *lh_Head;
   struct Node *lh_Tail;
   struct Node *lh_TailPred;
   UBYTE   lh_Type;
   UBYTE   l_pad;
};  /* word aligned */

struct MinList

Source: exec/lists.h


struct MinList {
   struct MinNode *mlh_Head;
   struct MinNode *mlh_Tail;
   struct MinNode *mlh_TailPred;
};  /* longword aligned */

memory.h


struct MemChunk

Source: exec/memory.h


struct MemChunk {
    struct MemChunk *mc_Next;   /* pointer to next chunk */
    ULONG   mc_Bytes;       /* chunk byte size  */
};

struct MemEntry

Source: exec/memory.h


struct MemEntry {
union {
    ULONG   meu_Reqs;       /* the AllocMem requirements */
    APTR    meu_Addr;       /* the address of this memory region */
    } me_Un;
    ULONG   me_Length;      /* the length of this memory region */
};

struct MemHandlerData

Source: exec/memory.h


struct MemHandlerData
{
    ULONG   memh_RequestSize;   /* Requested allocation size */
    ULONG   memh_RequestFlags;  /* Requested allocation flags */
    ULONG   memh_Flags;     /* Flags (see below) */
};

struct MemHeader

Source: exec/memory.h


struct MemHeader {
    struct Node mh_Node;
    UWORD   mh_Attributes;  /* characteristics of this region */
    struct MemChunk *mh_First; /* first free region     */
    APTR    mh_Lower;       /* lower memory bound       */
    APTR    mh_Upper;       /* upper memory bound+1 */
    ULONG   mh_Free;        /* total number of free bytes   */
};

struct MemList

Source: exec/memory.h


struct MemList {
    struct Node ml_Node;
    UWORD   ml_NumEntries;  /* number of entries in this struct */
    struct MemEntry ml_ME[1];   /* the first entry  */
};

nodes.h


struct MinNode

Source: exec/nodes.h


struct MinNode {
    struct MinNode *mln_Succ;
    struct MinNode *mln_Pred;
};

struct Node

Source: exec/nodes.h


struct Node {
    struct Node *ln_Succ;   /* Pointer to next (successor) */
    struct Node *ln_Pred;   /* Pointer to previous (predecessor) */
    UBYTE   ln_Type;
    BYTE    ln_Pri;     /* Priority, for sorting */
    char    *ln_Name;       /* ID string, null terminated */
};  /* Note: word aligned */

ports.h


struct Message

Source: exec/ports.h


struct Message {
    struct Node mn_Node;
    struct MsgPort *mn_ReplyPort;  /* message reply port */
    UWORD   mn_Length;          /* total message length, in bytes */
                    /* (include the size of the Message */
                    /* structure in the length) */
};

struct MsgPort

Source: exec/ports.h


struct MsgPort {
    struct Node mp_Node;
    UBYTE   mp_Flags;
    UBYTE   mp_SigBit;      /* signal bit number    */
    void   *mp_SigTask;     /* object to be signalled */
    struct List mp_MsgList; /* message linked list  */
};

resident.h


struct Resident

Source: exec/resident.h


struct Resident {
    UWORD rt_MatchWord; /* word to match on (ILLEGAL)   */
    struct Resident *rt_MatchTag; /* pointer to the above   */
    APTR  rt_EndSkip;       /* address to continue scan */
    UBYTE rt_Flags;     /* various tag flags        */
    UBYTE rt_Version;       /* release version number   */
    UBYTE rt_Type;      /* type of module (NT_XXXXXX)   */
    BYTE  rt_Pri;       /* initialization priority */
    char  *rt_Name;     /* pointer to node name */
    char  *rt_IdString; /* pointer to identification string */
    APTR  rt_Init;      /* pointer to init code */
};

semaphores.h


struct SemaphoreMessage

Source: exec/semaphores.h


struct SemaphoreMessage
{
    struct Message       ssm_Message;
    struct SignalSemaphore   *ssm_Semaphore;
};

struct SemaphoreRequest

Source: exec/semaphores.h


struct SemaphoreRequest
{
    struct MinNode   sr_Link;
    struct Task *sr_Waiter;
};

struct SignalSemaphore

Source: exec/semaphores.h


struct SignalSemaphore
{
    struct Node     ss_Link;
    WORD            ss_NestCount;
    struct MinList       ss_WaitQueue;
    struct SemaphoreRequest ss_MultipleLink;
    struct Task     *ss_Owner;
    WORD            ss_QueueCount;
};

tasks.h


struct StackSwapStruct

Source: exec/tasks.h


struct StackSwapStruct {
    APTR    stk_Lower;  /* Lowest byte of stack */
    ULONG   stk_Upper;  /* Upper end of stack (size + Lowest) */
    APTR    stk_Pointer;    /* Stack pointer at switch point */
};

struct Task

Source: exec/tasks.h


struct Task {
    struct Node tc_Node;
    UBYTE   tc_Flags;
    UBYTE   tc_State;
    BYTE    tc_IDNestCnt;       /* intr disabled nesting*/
    BYTE    tc_TDNestCnt;       /* task disabled nesting*/
    ULONG   tc_SigAlloc;        /* sigs allocated */
    ULONG   tc_SigWait;             /* sigs we are waiting for */
    ULONG   tc_SigRecvd;        /* sigs we have received */
    ULONG   tc_SigExcept;       /* sigs we will take excepts for */
    UWORD   tc_TrapAlloc;       /* traps allocated */
    UWORD   tc_TrapAble;        /* traps enabled */
    APTR    tc_ExceptData;      /* points to except data */
    APTR    tc_ExceptCode;      /* points to except code */
    APTR    tc_TrapData;        /* points to trap data */
    APTR    tc_TrapCode;        /* points to trap code */
    APTR    tc_SPReg;           /* stack pointer        */
    APTR    tc_SPLower;     /* stack lower bound    */
    APTR    tc_SPUpper;     /* stack upper bound + 2*/
    VOID    (*tc_Switch)();     /* task losing CPU    */
    VOID    (*tc_Launch)();     /* task getting CPU  */
    struct List tc_MemEntry;        /* Allocated memory. Freed by RemTask() */
    APTR    tc_UserData;        /* For use by the task; no restrictions! */
};