ErsGetTaskId - Get ERS task id for use with ErsEnableTask.


Get ERS task id for use with ErsEnableTask.


Some Systems, such as VxWorks based systems, run all programs in a common address space. In such systems static and global variables can be seen by all tasks. To allow tasks to have private copies of static and global variables it is possible to have such variables saved and restored during task context switching. Ers uses this technique to store task specific information. In such systems it is sometimes necessary to call Ers routines outside the context of a task (say in an interrupt routine), during which the task specific information will be unavailable. This routine is used in conjunction with ErsEnableTask and ErsRestoreTask to make the task specific information available in such places.

This routine can be used where the task ID returned by ErsStart(3) is not avaiable. It should be invoked in non-interrupt handler code to fetch the task id for passing to ErsEnableTask(3).




(ErsTaskIdType) = ErsGetTaskId (StatusType *status)


(">" input, "!" modified, "W" workspace, "<" output)

!statusStatusType *Modified status.

Include files


External functions used


External values used


Function Value

A value which can be passed to ErsEnableTask from an interrupt handler. If status is non-zero, zero is returned.

Prior requirements

ErsStart should have been called.


Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact