www.beck-ipc.com

@CHIP-RTOS C Library V2.00 - RTOS API


RTX_Create_Task

Create and start a task

int RTX_Create_Task ( int far *taskID,
                      const TaskDefBlock far *taskdefblock );

Parameters

taskID

Output Parameter:   Pointer to 16 bit storage for the taskID, allocated by the caller

taskdefblock

Input Parameter:   Pointer to a TaskDefBlock type data structure prepared by caller.

Return Value

0, task is running, output location taskID contains the 16 bit taskID
non-zero --> error code.

Comments

The caller must fill in portions of the TaskDefBlock structure prior to making this call.

The new task is immediately placed in the system's task ready queue.   Execution begins if the task is higher priority than any other task currently ready (including task which called RTX_Create_Task ). This function differs with RTX_Create_Task_Without_Run in that the new task is released to run within this function call.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Related Topics

IPC@CHIP System Tasks

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document