RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Task Manager sta_tsk - Start Task

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

1.4.3: sta_tsk - Start Task

CALLING SEQUENCE:

ER sta_tsk(
  ID tskid,
  INT stacd
);

STATUS CODES:

E_OK - Normal Completion

E_ID - Invalid ID Number (tskid was invalid or could not be used)

E_NOEXS - Object does not exist (the task specified by tskid does not exist)

E_OACV - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)

E_OBJ - Invalid object state (the target task is not in DORMANT state)

EN_OBJNO - An object number which could not be accessed on the target node is specified.

EN_CTXID - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion

EN_PAR - A value outside the range supported by the target node and/or transmission packet format was specified as a parameter (a value outside supported range was specified for stacd)

DESCRIPTION:

This system call starts the task specified by tskid. Specifically, it changes the state of the task specified by tskid from DORMANT into RUN/READY.

Stacd can be used to specify parameters to be passed to the task when it is started. This parameter can be read by the task being started, and may be used for transmitting simple messages.

The task priority on starting the task is given by the initial task priority parameter (itskpri) specified when the task was created.

Start request is not queued in this this system call. In other words, if this system call is issued when the target task is not in DORMANT state, the system call will be ignored, and an E_OBJ error returned to the issuing task.

If cre_tsk [level EN] is not implemented on a system, tasks are created statically when the system is started. Parameters required for creating a task, such as task starting address (task) and initial task priority (itskpri) are also specified statically at system startup.

NOTES:


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation