Main Page   Interface   Data Structures   File List   Data Fields   Globals  

TASK.h File Reference

Wrapper routines for making TASK/THREAD utilities portable between VxWorks and POSIX implementations. More...


Typedefs

typedef void * TASK_parameter
 The value of this parameter is passed transparently through as the first and only argument to the entry point of the created task.

typedef void *(* TASK_entry )(TASK_parameter parameter)
 Defines the call signature of entry point of a created TASK. More...


Functions

int TASK_activate (TASK_tcb *tcb)
 Activates a previously created task. More...

int TASK_create (TASK_tcb *tcb, const TASK_attr *attributes, TASK_entry entry_point, TASK_parameter parameter)
 Creates, but does not activate a task. More...

int TASK_destroy (TASK_tcb *tcb)
 Destroys, ie deletes, a previously created task. More...

int TASK_spawn (TASK_tcb *tcb, const TASK_attr *attributes, TASK_entry entry_point, TASK_parameter parameter)
 Convenience routine to both create and activate a task. More...


Detailed Description

Wrapper routines for making TASK/THREAD utilities portable between VxWorks and POSIX implementations.

ABSTRACT
These routines attempt to make TASK/THREAD manipulation portable across VxWorks and POSIX implementations. The thread models of these two systems are rather different so this is not an easy job and the rough edges certainly show.

Typedef Documentation

TASK_entry
 

Defines the call signature of entry point of a created TASK.

The entry of a newly created task acts, for intents and purposes as a function call with one argument, a void *, which is passed transparently through from the TASK_create() routine.


Function Documentation

int TASK_activate TASK_tcb *    tcb
 

Activates a previously created task.

Parameters:
tcb  The task control block of the task to activate.
Returns:
Status
Activates a previously created task. This allows the user to cleanly separate the definition, ie filling in the TASK_attr block, the task creation, using TASK_create(), and from the task activation.

int TASK_create TASK_tcb *    tcb,
const TASK_attr *    attributes,
TASK_entry    entry_point,
TASK_parameter    parameter
 

Creates, but does not activate a task.

Parameters:
tcb  The task control block of the task to create
attributes  A collection of attributes used to exactly specify the task. This parameter may be specified as NULL. In this case, a platform dependent set of attributes is assigned.
entry_point  The address of the entry point of the newly created task. See TASK_entry for the call signature.
parameter  A parameter which is passed transparently to the newly created task's entry point.
Creates, but does activate a task. This allows the user to cleanly separate the definition, ie filling in the TASK_attr block, the task creation, using TASK_create(), and from the task activation.

int TASK_destroy TASK_tcb *    tcb
 

Destroys, ie deletes, a previously created task.

Parameters:
tcb  The task control block of the task to destroy.
Destroys, ie deletes, previously created task. This routine will return any resources gathered by the TASK_create() utility, but will not free any user resources, such as the stack, associated with the task.

int TASK_spawn TASK_tcb *    tcb,
const TASK_attr *    attributes,
TASK_entry    entry_point,
TASK_parameter    parameter
 

Convenience routine to both create and activate a task.

Parameters:
tcb  The task control block of the task to spawn
attributes  A collection of attributes used to exactly specify the task. This parameter may be specified as NULL. In this case, a platform dependent set of attributes is assigned.
entry_point  The address of the entry point of the newly created task. See TASK_entry for the call signature.
parameter  A parameter which is passed transparently to the newly created task's entry point.
Convenience routine to both create and activate a task.


Generated on Fri Mar 1 16:55:30 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001