RTEMS Logo

RTEMS 4.6.0pre5 On-Line Library


Task Manager cre_tsk - Create Task

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

1.4.1: cre_tsk - Create Task

CALLING SEQUENCE:

ER cre_tsk(
  ID tskid,
  T_CTSK *pk_ctsk
);

STATUS CODES:

E_OK - Normal Completion

E_NOMEM - Insufficient memory (Memory for control block and/or user stack cannot be allocated)

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

E_RSATR - Reserved attribute (tskatr was invalid or could not be used)

E_OBJ - Invalid object state (a task of the same ID already exists)

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

E_PAR - Parameter error (pk_ctsk, task, itskpri and/or stksz is invalid)

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 exinf, tskatr, task, itskpri and/or stksz)

DESCRIPTION:

This system call creates the task specified by tskid. Specifically, a TCB (Task Control Block) is allocated for the task to be created, and initialized according to accompanying parameter values of itskpri, task, tksz, etc. A stack area is also allocated for the task based on the parameter stksz.

NOTES:

User tasks have positive ID numbers, while system tasks have negative ID numbers. User tasks cannot access system objects (objects having negative ID numbers).

The new task created by this system call will be put in DORMANT state.

Extended information (exinf) has been added. This allows the user to include additional information about task attributes. If a larger region is desired for including user information, the user should allocate memory area and set the address of the memory packet to exinf.

Multiprocessing is not supported. Thus none of the "EN_" status codes will be returned.


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

Copyright © 1988-2003 OAR Corporation