\hypertarget{EHP_8c}{
\section{EHP.c File Reference}
\label{EHP_8c}\index{EHP.c@{EHP.c}}
}
Event Handler Proxy, creates a proxy task to handle event related processing that is either not appropriate or too time consuming ({\em i.e\/}. results in unacceptable latency) in the LCBD event handling task).  


{\tt \#include $<$EFC/EHP.h$>$}\par
{\tt \#include $<$PBS/TASK.h$>$}\par
{\tt \#include $<$PBS/FORK.h$>$}\par
{\tt \#include $<$PBS/TOC.h$>$}\par
{\tt \#include $<$PBS/MBA.h$>$}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \textbf{\_\-EHP}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{EHP_8c_17ee5e810874bccf269a9b6b432e761e}{
\#define \textbf{NQUES}~31}
\label{EHP_8c_17ee5e810874bccf269a9b6b432e761e}

\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{EHP_8c_b3be74109b90e54dfc1ea2114cbdcba8}{
typedef struct \_\-EHP \textbf{EHP}}
\label{EHP_8c_b3be74109b90e54dfc1ea2114cbdcba8}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static int \hyperlink{EHP_8c_1251be08eca18ff4afdd8163f74043a4}{get\_\-task\_\-priority} ()
\begin{CompactList}\small\item\em Get the priority of this task. \item\end{CompactList}\item 
FORK\_\-fcb $\ast$ \hyperlink{EHP_8c_e7cb1b5472111c6eeac87772202ff960}{EHP\_\-create} (void)
\begin{CompactList}\small\item\em Creates the Event Handler Proxy task. \item\end{CompactList}\item 
unsigned int \hyperlink{EHP_8c_53f3777736f4ba4a647c7adf45f036bd}{EHP\_\-destroy} (void)
\begin{CompactList}\small\item\em Destroys the Event Handler Proxy task. \item\end{CompactList}\item 
FORK\_\-que $\ast$ \hyperlink{EHP_8c_027cd8aa693d59f9e35a2b559a663493}{EHP\_\-queGet} (int que\_\-id)
\begin{CompactList}\small\item\em Gets the fork que handle of the specified fork que. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{EHP_8c_e8429fbcdebca5636d91591fa6878a7c}{
static EHP \textbf{Ehp} = \{ NULL \}}
\label{EHP_8c_e8429fbcdebca5636d91591fa6878a7c}

\end{CompactItemize}


\subsection{Detailed Description}
Event Handler Proxy, creates a proxy task to handle event related processing that is either not appropriate or too time consuming ({\em i.e\/}. results in unacceptable latency) in the LCBD event handling task). 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}

   CVS $Id: EHP.c,v 1.2 2011/03/27 04:55:30 russell Exp $
\end{verbatim}
\normalsize


A FORK task with 31 queues is established. Clients may request one of the que to do their work in and then que such work using the normal FORK\_\-qusr routine. 

\subsection{Function Documentation}
\hypertarget{EHP_8c_e7cb1b5472111c6eeac87772202ff960}{
\index{EHP.c@{EHP.c}!EHP\_\-create@{EHP\_\-create}}
\index{EHP\_\-create@{EHP\_\-create}!EHP.c@{EHP.c}}
\subsubsection[{EHP\_\-create}]{\setlength{\rightskip}{0pt plus 5cm}FORK\_\-fcb $\ast$ EHP\_\-create (void)}}
\label{EHP_8c_e7cb1b5472111c6eeac87772202ff960}


Creates the Event Handler Proxy task. 

\begin{Desc}
\item[Returns:]The fork control block of the created task or NULL on failure \end{Desc}


References get\_\-task\_\-priority().

Referenced by EHP\_\-queGet().\hypertarget{EHP_8c_53f3777736f4ba4a647c7adf45f036bd}{
\index{EHP.c@{EHP.c}!EHP\_\-destroy@{EHP\_\-destroy}}
\index{EHP\_\-destroy@{EHP\_\-destroy}!EHP.c@{EHP.c}}
\subsubsection[{EHP\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int EHP\_\-destroy (void)}}
\label{EHP_8c_53f3777736f4ba4a647c7adf45f036bd}


Destroys the Event Handler Proxy task. 

\begin{Desc}
\item[Returns:]The status from FORK\_\-destroy \end{Desc}
\hypertarget{EHP_8c_027cd8aa693d59f9e35a2b559a663493}{
\index{EHP.c@{EHP.c}!EHP\_\-queGet@{EHP\_\-queGet}}
\index{EHP\_\-queGet@{EHP\_\-queGet}!EHP.c@{EHP.c}}
\subsubsection[{EHP\_\-queGet}]{\setlength{\rightskip}{0pt plus 5cm}FORK\_\-que $\ast$ EHP\_\-queGet (int {\em que\_\-id})}}
\label{EHP_8c_027cd8aa693d59f9e35a2b559a663493}


Gets the fork que handle of the specified fork que. 

\begin{Desc}
\item[Returns:]The FORK que handle or NULL on failure\end{Desc}
This routine will create the fork task if is does not already exist. 

References EHP\_\-create().\hypertarget{EHP_8c_1251be08eca18ff4afdd8163f74043a4}{
\index{EHP.c@{EHP.c}!get\_\-task\_\-priority@{get\_\-task\_\-priority}}
\index{get\_\-task\_\-priority@{get\_\-task\_\-priority}!EHP.c@{EHP.c}}
\subsubsection[{get\_\-task\_\-priority}]{\setlength{\rightskip}{0pt plus 5cm}static inline int get\_\-task\_\-priority ()\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{EHP_8c_1251be08eca18ff4afdd8163f74043a4}


Get the priority of this task. 

\begin{Desc}
\item[Returns:]The priority of this task\end{Desc}
This function uses CPU\_\-DB\_\-getTaskPriority on VXWORKs platforms and returns 0 for all host platforms. No host platform actually supports task priorities, so doing this eliminates CPU\_\-DB from the load. 

Referenced by EHP\_\-create().