summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-06-28 13:57:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-06-28 13:57:18 +0000
commitd4696ebb5bdd251ad42753ab6a7a744f5d6a5bb4 (patch)
tree35712858af7432314d7cef02a60090cf4275de42
parent2002-06-27 Thomas Doerfler <Thomas.Doerfler@imd-systems.de> (diff)
downloadrtems-d4696ebb5bdd251ad42753ab6a7a744f5d6a5bb4.tar.bz2
2002-06-28 Joel Sherrill <joel@OARcorp.com>
* 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.
-rw-r--r--doc/user/ChangeLog6
-rw-r--r--doc/user/userext.t22
2 files changed, 22 insertions, 6 deletions
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 <joel@OARcorp.com>
+
+ * 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 <ccj@acm.org>
* 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