Important: The information in this document is obsolete and should not be used for new development.
Routine Records
A routine record is a data structure that contains information about a particular routine. The routine descriptor specifies, among other things, the instruction set architecture
of the routine, the number and size of the routine's parameters, the routine's calling conventions, and the routine's location in memory. At least one routine record is contained in theroutineRecords
field of a routine descriptor. A routine record is defined by theRoutineRecord
data type.
struct RoutineRecord { ProcInfoType procInfo; /*calling conventions*/ unsigned char reserved1; /*reserved*/ ISAType ISA; /*instruction set architecture*/ RoutineFlagsType routineFlags; /*flags for each routine*/ ProcPtr procDescriptor; /*the thing we're calling*/ unsigned long reserved2; /*reserved*/ unsigned long selector; /*selector for dispatched calls*/ }; typedef struct RoutineRecord RoutineRecord; typedef RoutineRecord *RoutineRecordPtr, **RoutineRecordHandle;
Field Description
procInfo
- A value of type
ProcInfoType
that encodes essential information about the routine's calling conventions and parameters. See "Procedure Information" beginning on page 2-27 for a complete list of the constants you can use to set this field.reserved1
- Reserved. This field must be 0.
ISA
- The instruction set architecture of the routine. See "Instruction Set Architectures" beginning on page 2-35 for a complete listing of the constants you can use to set this field.
routineFlags
- A value of type
RoutineFlagsType
that contains a set of flags describing the routine. See "Routine Flags" beginning on page 2-34 for a complete listing of the constants you can use to set this field.procDescriptor
- A pointer to the routine's code. If the routine consists of 680x0
code and thekProcDescriptorIsAbsolute
flag is set in theroutineFlags
field, then this field contains the address of the routine's entry point. If the routine consists of 680x0 code and thekProcDescriptorIsRelative
flag is set, then this field contains the offset from the beginning of the routine descriptor to the routine's entry point. If the routine consists of PowerPC code,
thekFragmentIsPrepared
flag is set, and thekProcDescriptorIsAbsolute
flag is set, then this field contains the address of the routine's transition vector. If the routine consists of PowerPC code, thekFragmentNeedsPreparing
flag is set,
and thekProcDescriptorIsRelative
flag is set, then this field contains the offset from the beginning of the routine descriptor to the routine's entry point.reserved2
- Reserved. This field must be 0.
- selector
- Reserved. This field must be 0. For routines that are dispatched, this field contains the routine selector.