Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC System Software /
Chapter 2 - Mixed Mode Manager / Mixed Mode Manager Reference
Data Structures


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 the routineRecords field of a routine descriptor. A routine record is defined by the RoutineRecord 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 the kProcDescriptorIsAbsolute flag is set in the routineFlags field, then this field contains the address of the routine's entry point. If the routine consists of 680x0 code and the kProcDescriptorIsRelative 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,
the kFragmentIsPrepared flag is set, and the kProcDescriptorIsAbsolute flag is set, then this field contains the address of the routine's transition vector. If the routine consists of PowerPC code, the kFragmentNeedsPreparing flag is set,
and the kProcDescriptorIsRelative 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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996