\hypertarget{TASK_8h}{
\section{TASK.h File Reference}
\label{TASK_8h}\index{TASK.h@{TASK.h}}
}
Wrapper routines for making TASK/THREAD utilities portable between Vx\-Works and POSIX implementations. 


\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{TASK_8h_a0}{
\index{TASK_parameter@{TASK\_\-parameter}!TASK.h@{TASK.h}}\index{TASK.h@{TASK.h}!TASK_parameter@{TASK\_\-parameter}}
typedef void $\ast$ \hyperlink{TASK_8h_a0}{TASK\_\-parameter}}
\label{TASK_8h_a0}

\begin{CompactList}\small\item\em The value of this parameter is passed transparently through as the first and only argument to the entry point of the created task.\item\end{CompactList}\item 
typedef void $\ast$($\ast$ \hyperlink{TASK_8h_a1}{TASK\_\-entry} )(\hyperlink{TASK_8h_a0}{TASK\_\-parameter} parameter)
\begin{CompactList}\small\item\em Defines the call signature of entry point of a created TASK.\item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{TASK_8h_a2}{TASK\_\-activate} (TASK\_\-tcb $\ast$tcb)
\begin{CompactList}\small\item\em Activates a previously created task.\item\end{CompactList}\item 
int \hyperlink{TASK_8h_a3}{TASK\_\-create} (TASK\_\-tcb $\ast$tcb, const TASK\_\-attr $\ast$attributes, \hyperlink{TASK_8h_a1}{TASK\_\-entry} entry\_\-point, \hyperlink{TASK_8h_a0}{TASK\_\-parameter} parameter)
\begin{CompactList}\small\item\em Creates, but does not activate a task.\item\end{CompactList}\item 
int \hyperlink{TASK_8h_a4}{TASK\_\-destroy} (TASK\_\-tcb $\ast$tcb)
\begin{CompactList}\small\item\em Destroys, ie deletes, a previously created task.\item\end{CompactList}\item 
int \hyperlink{TASK_8h_a5}{TASK\_\-spawn} (TASK\_\-tcb $\ast$tcb, const TASK\_\-attr $\ast$attributes, \hyperlink{TASK_8h_a1}{TASK\_\-entry} entry\_\-point, \hyperlink{TASK_8h_a0}{TASK\_\-parameter} parameter)
\begin{CompactList}\small\item\em Convenience routine to both create and activate a task.\item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Wrapper routines for making TASK/THREAD utilities portable between Vx\-Works and POSIX implementations.





 \begin{Desc}
\item[ABSTRACT]\par
 These routines attempt to make TASK/THREAD manipulation portable across Vx\-Works 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.\end{Desc}


\subsection{Typedef Documentation}
\hypertarget{TASK_8h_a1}{
\index{TASK.h@{TASK.h}!TASK_entry@{TASK\_\-entry}}
\index{TASK_entry@{TASK\_\-entry}!TASK.h@{TASK.h}}
\subsubsection[TASK\_\-entry]{\setlength{\rightskip}{0pt plus 5cm}TASK\_\-entry}}
\label{TASK_8h_a1}


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 {\tt void} $\ast$, which is passed transparently through from the \hyperlink{TASK_8h_a3}{TASK\_\-create}() routine. 

\subsection{Function Documentation}
\hypertarget{TASK_8h_a2}{
\index{TASK.h@{TASK.h}!TASK_activate@{TASK\_\-activate}}
\index{TASK_activate@{TASK\_\-activate}!TASK.h@{TASK.h}}
\subsubsection[TASK\_\-activate]{\setlength{\rightskip}{0pt plus 5cm}int TASK\_\-activate (TASK\_\-tcb $\ast$ {\em tcb})}}
\label{TASK_8h_a2}


Activates a previously created task.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
tcb}]The task control block of the task to activate. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns: ]\par
Status\end{Desc}
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 \hyperlink{TASK_8h_a3}{TASK\_\-create}(), and from the task activation. \hypertarget{TASK_8h_a3}{
\index{TASK.h@{TASK.h}!TASK_create@{TASK\_\-create}}
\index{TASK_create@{TASK\_\-create}!TASK.h@{TASK.h}}
\subsubsection[TASK\_\-create]{\setlength{\rightskip}{0pt plus 5cm}int TASK\_\-create (TASK\_\-tcb $\ast$ {\em tcb}, const TASK\_\-attr $\ast$ {\em attributes}, \hyperlink{TASK_8h_a1}{TASK\_\-entry} {\em entry\_\-point}, \hyperlink{TASK_8h_a0}{TASK\_\-parameter} {\em parameter})}}
\label{TASK_8h_a3}


Creates, but does not activate a task.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
tcb}]The task control block of the task to create \item[{\em 
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. \item[{\em 
entry\_\-point}]The address of the entry point of the newly created task. See TASK\_\-entry for the call signature. \item[{\em 
parameter}]A parameter which is passed transparently to the newly created task's entry point.\end{description}
\end{Desc}
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 \hyperlink{TASK_8h_a3}{TASK\_\-create}(), and from the task activation. \hypertarget{TASK_8h_a4}{
\index{TASK.h@{TASK.h}!TASK_destroy@{TASK\_\-destroy}}
\index{TASK_destroy@{TASK\_\-destroy}!TASK.h@{TASK.h}}
\subsubsection[TASK\_\-destroy]{\setlength{\rightskip}{0pt plus 5cm}int TASK\_\-destroy (TASK\_\-tcb $\ast$ {\em tcb})}}
\label{TASK_8h_a4}


Destroys, ie deletes, a previously created task.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
tcb}]The task control block of the task to destroy.\end{description}
\end{Desc}
Destroys, ie deletes, previously created task. This routine will return any resources gathered by the \hyperlink{TASK_8h_a3}{TASK\_\-create}() utility, but will not free any user resources, such as the stack, associated with the task. \hypertarget{TASK_8h_a5}{
\index{TASK.h@{TASK.h}!TASK_spawn@{TASK\_\-spawn}}
\index{TASK_spawn@{TASK\_\-spawn}!TASK.h@{TASK.h}}
\subsubsection[TASK\_\-spawn]{\setlength{\rightskip}{0pt plus 5cm}int TASK\_\-spawn (TASK\_\-tcb $\ast$ {\em tcb}, const TASK\_\-attr $\ast$ {\em attributes}, \hyperlink{TASK_8h_a1}{TASK\_\-entry} {\em entry\_\-point}, \hyperlink{TASK_8h_a0}{TASK\_\-parameter} {\em parameter})}}
\label{TASK_8h_a5}


Convenience routine to both create and activate a task.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
tcb}]The task control block of the task to spawn \item[{\em 
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. \item[{\em 
entry\_\-point}]The address of the entry point of the newly created task. See TASK\_\-entry for the call signature. \item[{\em 
parameter}]A parameter which is passed transparently to the newly created task's entry point.\end{description}
\end{Desc}
Convenience routine to both create and activate a task. 