Carbon


MPTaskInfo

Header: Multiprocessing.h

Contains information about a task.

struct MPTaskInfo {
    PBVersion version; 
    OSType name; 
    OSType queueName; 
    UInt16 runState; 
    UInt16 lastCPU; 
    UInt32 weight; 
    MPProcessID processID; 
    AbsoluteTime cpuTime; 
    AbsoluteTime schedTime; 
    AbsoluteTime creationTime; 
    ItemCount codePageFaults; 
    ItemCount dataPageFaults; 
    ItemCount preemptions; 
    MPCpuID cpuID; 
    MPOpaqueID blockedObject; 
    MPAddressSpaceID spaceID; 
    LogicalAddress stackBase; 
    LogicalAddress stackLimit; 
    LogicalAddress stackCurr;
};

Field descriptions

version

The version of this data structure.

name

The name of the task.

queueName

A four-byte code indicating the status of the queue waiting on the task. This field can contain any of the following values:

'SEMA' - waiting on a semaphore

'MSGQ' - waiting on a message queue

'CRGN' - waiting on a critical region

'EVNT' - waiting on an event group

'DBUG' - task is suspended

'DLYQ' - waiting on a synchronous delay

'RDYQ' - on the ready queue

runState

The current state of the task (running, ready, or blocked).

lastCPU

The address of the last processor that ran this task.

weight

The weighting assigned to this task.

processID

The ID of the process that owns this task.

cpuTime

The accumulated CPU time used by the task.

schedTime

The time when the task was last scheduled.

creationTime

The time when the task was created.

codePageFaults

The number of page faults that occurred during code execution.

dataPageFaults

The number of page faults that occurred during data access.

preemptions

The number of times this task was preempted.

cpuID

The ID of the last processor that ran this task.

blockedObject
spaceID
stackBase
stackLimit
stackCurr

If you specify the kMPTaskStateTaskInfo constant when calling the function MPExtractTaskState, Multiprocessing Services returns state information in an MPTaskInfo structure.

VERSION NOTES

Introduced with Multiprocessing Services 2.1.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)