|
Mac OS 9
|
#include <Multiprocessing.h>
The functions MPExtractTaskState and MPSetTaskState infer the size of the "info" buffer from the "kind" parameter. A given value for MPTaskStateKind will always refer to a single specific physical buffer layout. Should new register sets be added, or the size or number of any registers change, new values of MPTaskStateKind will be introduced to refer to the new buffer layouts.
The following types for the buffers are in MachineExceptions. The correspondence between MPTaskStateKind values and MachineExceptions types is:
| kMPTaskStateRegisters | RegisterInformation |
| kMPTaskStateFPU | FPUInformation |
| kMPTaskStateVectors | VectorInformation |
| kMPTaskStateMachine | MachineInformation |
| kMPTaskState32BitMemoryException | ExceptionInfo for old-style 32-bit memory exceptions |
For reference, on PowerPC the MachineExceptions types contain:
| RegisterInformation | The GPRs, 32 values of 64 bits each. |
| FPUInformation | The FPRs plus FPSCR, 32 values of 64 bits each, one value of 32 bits. |
| VectorInformation | The AltiVec vector registers plus VSCR and VRSave, 32 values of 128 bits each, one value of 128 bits, and one 32 bit value |
| MachineInformation | The CTR, LR, PC, each of 64 bits. The CR, XER, MSR, MQ, exception kind, and DSISR, each of 32 bits. The 64 bit DAR. |
| ExceptionInfo | Only memory exceptions are specified, 4 fields of 32 bits each. Note that this type only covers memory exceptions on 32-bit CPUs! The following types are declared here: MPTaskStateTaskInfo |