RTEMS Logo

RTEMS 4.9.4 On-Line Library


User Extensions Manager TASK_CREATE Extension

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

22.2.3.1: TASK_CREATE Extension

The TASK_CREATE extension directly corresponds to the rtems.task_create directive. If this extension is defined in any static or dynamic extension set and a task is being created, then the extension routine will automatically be invoked by RTEMS. The extension should have a prototype similar to the following:

function User_Task_Create (
   Current_Task : in     RTEMS.TCB_Pointer;
   New_Task     : in     RTEMS.TCB_Pointer
) returns Boolean;

where current_task can be used to access the TCB for the currently executing task, and new_task can be used to access the TCB for the new task being created. This extension is invoked from the rtems.task_create directive after new_task has been completely initialized, but before it is placed on a ready TCB chain.

The user extension is expected to return the boolean value true if it successfully executed and false otherwise. A task create user extension will frequently attempt to allocate resources. If this allocation fails, then the extension should return false and the entire task create operation will fail.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2008 OAR Corporation