From d4696ebb5bdd251ad42753ab6a7a744f5d6a5bb4 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 28 Jun 2002 13:57:18 +0000 Subject: 2002-06-28 Joel Sherrill * userext.t: Per PR228, correct the prototype of the task create user extension to indicate it returns a boolean and augment the documentation to explain the purpose of the boolean return value. --- doc/user/ChangeLog | 6 ++++++ doc/user/userext.t | 22 ++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'doc/user') diff --git a/doc/user/ChangeLog b/doc/user/ChangeLog index c23a37339d..ec9a2ddbcc 100644 --- a/doc/user/ChangeLog +++ b/doc/user/ChangeLog @@ -1,3 +1,9 @@ +2002-06-28 Joel Sherrill + + * userext.t: Per PR228, correct the prototype of the task create + user extension to indicate it returns a boolean and augment the + documentation to explain the purpose of the boolean return value. + 2002-04-12 Chris Johns * doc/user/userext.t: Per PR138, updated the documentation to show diff --git a/doc/user/userext.t b/doc/user/userext.t index 08ac6beb20..1d6308d1b1 100644 --- a/doc/user/userext.t +++ b/doc/user/userext.t @@ -199,7 +199,8 @@ conventions on the user. @subsubsection TASK_CREATE Extension The TASK_CREATE extension directly corresponds to the -task_create directive. If this extension is defined in any +@code{@value{DIRPREFIX}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 @@ -209,7 +210,7 @@ following: @findex rtems_extension @ifset is-C @example -rtems_extension user_task_create( +boolean user_task_create( rtems_tcb *current_task, rtems_tcb *new_task ); @@ -218,20 +219,29 @@ rtems_extension user_task_create( @ifset is-Ada @example -procedure User_Task_Create ( +function User_Task_Create ( Current_Task : in RTEMS.TCB_Pointer; New_Task : in RTEMS.TCB_Pointer -); +) returns Boolean; @end example @end ifset -where current_task can be used to access the TCB for +where @code{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 task_create directive after new_task has been +invoked from the @code{@value{DIRPREFIX}task_create} +directive after @code{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 @code{TRUE} if it successfully executed and +@code{FALSE} otherwise. A task create user extension +will frequently attempt to allocate resources. If this +allocation fails, then the extension should return +@code{FALSE} and the entire task create operation +will fail. + @subsubsection TASK_START Extension The TASK_START extension directly corresponds to the -- cgit v1.2.3