Download RadiSys ARTIC960 Programmer`s Reference

Transcript
GetProcessData—Get Process Data
GetProcessData—Get Process Data
This service returns the process instance data associated with the indicated application
environment and process.
Functional Prototype
RIC_ULONG GetProcessData (void
unsigned char
RIC_PROCESSID
*ProcessDataPtr,
ApplID,
ProcessID);
Parameters
ProcessDataPtr
Input. Pointer to location where the kernel returns the pointer to the process
instance data. If no process instance data is found, a NULL pointer is
returned.
ApplID
Input. Unique ID to indicate with which application environment the process
instance data is associated.
ProcessID
Input. Process ID of the instance data to be retrieved. A value of 0 indicates
the process in execution.
Returns
RC_SUCCESS
RC_INVALID_PROCESSID
Remarks
This service can be called from an interrupt handler or a call handler. However, doing so
with a ProcessID value of 0 may give unexpected results and should be used with caution.
While in an interrupt handler, the process in execution is considered to be the kernel.
While in a call handler, the process in execution is considered to be the process that called
the handler. If call processes are nested, it is the process that called the first handler.
46
ARTIC960 Programmer’s Reference