Copyright (c) Hyperion Entertainment and contributors.

AmigaDOS Data Structures

From AmigaOS Documentation Wiki
Revision as of 16:29, 27 April 2012 by Steven Solie (talk | contribs)
Jump to navigation Jump to search

Process Data Structures

These values are created as part of an AmigaDOS process; there is a complete set for each process.

A process is an Exec task with a number of extra data structures appended. The process structure consists of:

  • Exec task structure
  • Exec message port
  • AmigaDOS process value

The process identifier AmigaDOS uses internally is a pointer to the Exec message port (pr_MessagePort) from which the Exec task may be obtained.

AmigaDOS process values are as follows:

Type Name Description
BPTR pr_SegList Array of seg lists used by this process
LONG pr_StackSize Size of process stack in bytes
APTR pr_GlobVec Global vector for this process (BCPL)
LONG pr_TaskNum CLI task number of zero if not a CLI
BPTR pr_StackBase Ptr to high memory end of process stack
LONG pr_Result2 Value of secondary result from last call
BPTR pr_CurrentDir Lock associated with current directory
BPTR pr_CIS Current CLI Input Stream
BPTR pr_COS Current CLI Output Stream
APTR pr_ConsoleTask Console handler process for current window
APTR pr_FileSystemTask File handler process for current drive
BPTR pr_CLI Pointer to CLI
APTR pr_ReturnAdd Pointer to previous stack frame
APTR pr_PktWait Function to be called when awaiting msg
APTR pr_WindowPtr Window for error printing
BPTR pr_HomeDir Home directory of executing program
LONG pr_Flags Flags telling DOS about process
LONG (*pr_ExitCode)(LONG returncode, LONG pr_ExitData) Code to call on exit of program or NULL
LONG pr_ExitData Passed as an argument to pr_ExitCode
UBYTE* pr_Arguments Arguments passed to the process at start
struct MinList pr_LocalVars Local environment variables
ULONG pr_ShellPrivate For the use of the current Shell
BPTR pr_CES Error stream - if NULL, use pr_COS