\hypertarget{PBS_8c}{
\section{PBS.c File Reference}
\label{PBS_8c}\index{PBS.c@{PBS.c}}
}
PBS library, contains the initialization routines for PBS.  


{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$PBS\_\-DB/PBS\_\-DB\_\-schema.h$>$}\par
{\tt \#include $<$PBS/PBS.h$>$}\par
{\tt \#include $<$PBS/REG.h$>$}\par
{\tt \#include $<$PBS/MBA.h$>$}\par
{\tt \#include $<$PBS/TAU.h$>$}\par
{\tt \#include $<$PBS/TBD.h$>$}\par
{\tt \#include $<$PBS/PTS.h$>$}\par
{\tt \#include $<$PBS/WUT.h$>$}\par
{\tt \#include $<$PBS/WCT.h$>$}\par
{\tt \#include $<$PBI/Unions.h$>$}\par
{\tt \#include $<$PBI/PTR.h$>$}\par
{\tt \#include $<$CDM/CDM\_\-pubdefs.h$>$}\par
{\tt \#include $<$impl/PBS.c.xx-xxx-xxx$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{PBS_8c_9731900acfa8666398d006a17ea97321}{TASK\_\-sys\_\-init} (void)
\begin{CompactList}\small\item\em Performs one time only initialization of the TASK facility. \item\end{CompactList}\item 
int \hyperlink{PBS_8c_c68554e999802609b56498af6a01e4e5}{TASK\_\-sys\_\-shutdown} (void)
\begin{CompactList}\small\item\em Performs the shutdown of the TASK facility. This essentially undoes what TASK\_\-sys\_\-init did. \item\end{CompactList}\item 
int \hyperlink{PBS_8c_c8f38179c95aa30f0deb311bcf81131b}{PBS\_\-configure} (void)
\begin{CompactList}\small\item\em One-time PBS library initialization routine via a configuration file. \item\end{CompactList}\item 
int \hyperlink{PBS_8c_2922756cb06c398efb39f112a5f32e67}{PBS\_\-initialize} (int wut\_\-tmr\_\-cnt, int keepalive\_\-period)
\begin{CompactList}\small\item\em One-time PBS library initialization routine. \item\end{CompactList}\item 
int \hyperlink{PBS_8c_b3f4d121127160446521c2e17690d99a}{PBS\_\-initialize2} (int wut\_\-tmr\_\-cnt, int keepalive\_\-period, \hyperlink{MBA_8h_95766fb680ec2b83980808e5898ccccb}{MBA\_\-create\_\-cb} mba\_\-create, void $\ast$mba\_\-prm)
\begin{CompactList}\small\item\em One-time PBS library initialization routine. \item\end{CompactList}\item 
int \hyperlink{PBS_8c_0cc597d80b5d0e321cc9fbe123f621f8}{PBS\_\-shutdown} ()
\begin{CompactList}\small\item\em Shuts down the PBS facility. \item\end{CompactList}\item 
void \hyperlink{PBS_8c_ad8d853e54436c5f4edb104eb4f9b08f}{PBS\_\-fast\_\-clear} (void $\ast$ptr, unsigned int nbytes)
\begin{CompactList}\small\item\em Clears (Zeroes) the specified memory. \item\end{CompactList}\item 
int \hyperlink{PBS_8c_08401902d7200b283485cb01c84e3f97}{PBS\_\-crashPrint} (\hyperlink{PBS_8h_8vx-xxx-xxx_91438035a270a9bd85826089264f83d9}{PBS\_\-crashType} type, const \hyperlink{struct__PBS__crashCtx}{PBS\_\-crashCtx} $\ast$ctx, unsigned int options, const char $\ast$string)
\begin{CompactList}\small\item\em Very simple default PBS crash handler. \item\end{CompactList}\item 
\hyperlink{PBS_8h_0eac25bd0569cf1da5c4b63f87b30880}{PBS\_\-crashHandler} \hyperlink{PBS_8c_4ed1561beb4965259f719329b6662a1d}{PBS\_\-crashHandlerSet} (\hyperlink{PBS_8h_0eac25bd0569cf1da5c4b63f87b30880}{PBS\_\-crashHandler} crashHandler)
\begin{CompactList}\small\item\em Installs a new user crash handler. \item\end{CompactList}\item 
void \hyperlink{PBS_8c_a5f95b072e29b87d7b46fab1a37c7e58}{PBS\_\-crash} (\hyperlink{PBS_8h_8vx-xxx-xxx_91438035a270a9bd85826089264f83d9}{PBS\_\-crashType} type, const \hyperlink{struct__PBS__crashCtx}{PBS\_\-crashCtx} $\ast$ctx, unsigned int options, const char $\ast$string)
\begin{CompactList}\small\item\em General purposes reboot routine. \item\end{CompactList}\item 
void \hyperlink{PBS_8c_8378c4e97f00cca6b3854d4b3e6d00ea}{PBS\_\-reboot} (unsigned int reason, unsigned int parameter, void $\ast$pc, unsigned int options, const char $\ast$string)
\begin{CompactList}\small\item\em Routine to initiate a commanded reboot. \item\end{CompactList}\item 
void \hyperlink{PBS_8c_62f0edafbc05e190e8f9af709a12744a}{PBS\_\-panic} (unsigned int reason, unsigned int parameter, void $\ast$pc, unsigned int options, const char $\ast$string)
\begin{CompactList}\small\item\em Routine to initiate a panic reboot. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hypertarget{PBS_8c_65c955e4873a490682fd8c72c04d8d4e}{
static int \hyperlink{PBS_8c_65c955e4873a490682fd8c72c04d8d4e}{PbsInitialized} = 0}
\label{PBS_8c_65c955e4873a490682fd8c72c04d8d4e}

\begin{CompactList}\small\item\em Static flag indicating the PBS facility has been initialized. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
PBS library, contains the initialization routines for PBS. 

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


\footnotesize\begin{verbatim}

   CVS $Id: PBS.c,v 1.12 2011/03/24 23:05:46 apw Exp $
\end{verbatim}
\normalsize


\begin{Desc}
\item[Warning:]This is currently a kludge. \end{Desc}


\subsection{Function Documentation}
\hypertarget{PBS_8c_c8f38179c95aa30f0deb311bcf81131b}{
\index{PBS.c@{PBS.c}!PBS\_\-configure@{PBS\_\-configure}}
\index{PBS\_\-configure@{PBS\_\-configure}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-configure}]{\setlength{\rightskip}{0pt plus 5cm}int PBS\_\-configure (void)}}
\label{PBS_8c_c8f38179c95aa30f0deb311bcf81131b}


One-time PBS library initialization routine via a configuration file. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em 1,PBS}]already initialized \item[{\em -1,Error}]\end{description}
\end{Desc}


References PBS\_\-initialize(), and PBS\_\-initialize2().\hypertarget{PBS_8c_a5f95b072e29b87d7b46fab1a37c7e58}{
\index{PBS.c@{PBS.c}!PBS\_\-crash@{PBS\_\-crash}}
\index{PBS\_\-crash@{PBS\_\-crash}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-crash}]{\setlength{\rightskip}{0pt plus 5cm}void PBS\_\-crash ({\bf PBS\_\-crashType} {\em type}, \/  const {\bf PBS\_\-crashCtx} $\ast$ {\em ctx}, \/  unsigned int {\em options}, \/  const char $\ast$ {\em string})}}
\label{PBS_8c_a5f95b072e29b87d7b46fab1a37c7e58}


General purposes reboot routine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]The type of reboot being requested, {\em i.e\/}. one of \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_8vx-xxx-xxx_91438035a270a9bd85826089264f83d9}{PBS\_\-crashType}. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]A filled in \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_9395799768d4e7acfc3f8cac98f41eec}{PBS\_\-crashCtx} block. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em options}]A set options. See \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_d7f34d389040bd2d9f88269857e29d82}{PBS\_\-crashOptions} for further details. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]An arbitrary user string. This is used iff there is an active PBS crash handler, in which case it is merely passed through to it. \end{description}
\end{Desc}


References PBS\_\-LOCK.\hypertarget{PBS_8c_4ed1561beb4965259f719329b6662a1d}{
\index{PBS.c@{PBS.c}!PBS\_\-crashHandlerSet@{PBS\_\-crashHandlerSet}}
\index{PBS\_\-crashHandlerSet@{PBS\_\-crashHandlerSet}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-crashHandlerSet}]{\setlength{\rightskip}{0pt plus 5cm}{\bf PBS\_\-crashHandler} PBS\_\-crashHandlerSet ({\bf PBS\_\-crashHandler} {\em crashHandler})}}
\label{PBS_8c_4ed1561beb4965259f719329b6662a1d}


Installs a new user crash handler. 

\begin{Desc}
\item[Returns:]The old crash handler\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em crashHandler}]The new crash handler routine. If this may be NULL or PBS\_\-CRASH\_\-HANDLER\_\-DEFAULT\end{description}
\end{Desc}
This routine may be specified as NULL, in which case no user crash handler callback routine is executed.

\begin{Desc}
\item[Note:]While one can currently get the same effect using either of the two example pieces of code below. If one uses the former, then the PBS crash handler is always \end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8c_08401902d7200b283485cb01c84e3f97}{PBS\_\-crashPrint()}, while if one uses the later, the crash handler tracks the current runtime default.\end{Desc}


\begin{Code}\begin{verbatim}   PBS_crashHandlerSet (PBS_crashPrint);
\end{verbatim}
\end{Code}





\begin{Code}\begin{verbatim}   PBS_crashHandlerSet (PBS_CRASH_HANDLER_DEFAULT);
\end{verbatim}
\end{Code}

 

References PBS\_\-CRASH\_\-HANDLER\_\-DEFAULT, and PBS\_\-crashPrint().

Referenced by PBS\_\-initialize2().\hypertarget{PBS_8c_08401902d7200b283485cb01c84e3f97}{
\index{PBS.c@{PBS.c}!PBS\_\-crashPrint@{PBS\_\-crashPrint}}
\index{PBS\_\-crashPrint@{PBS\_\-crashPrint}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-crashPrint}]{\setlength{\rightskip}{0pt plus 5cm}int PBS\_\-crashPrint ({\bf PBS\_\-crashType} {\em type}, \/  const {\bf PBS\_\-crashCtx} $\ast$ {\em ctx}, \/  unsigned int {\em options}, \/  const char $\ast$ {\em string})}}
\label{PBS_8c_08401902d7200b283485cb01c84e3f97}


Very simple default PBS crash handler. 

\begin{Desc}
\item[Returns:]{\em options\/} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]The type of reboot being requested, {\em i.e\/}. one of \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_8vx-xxx-xxx_91438035a270a9bd85826089264f83d9}{PBS\_\-crashType}. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctx}]Pointer to a completed PBS\_\-crashCtx block. \item[{\em options}]A set options. See \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_d7f34d389040bd2d9f88269857e29d82}{PBS\_\-crashOptions} for further details. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]An arbitrary user string. It is just printed as the first line of the output.\end{description}
\end{Desc}
This is the current default user handler, {\em i\/}..e the one gets if PBS\_\-CRASH\_\-HANDLER\_\-DEFAULT is specified as the argument to \begin{Desc}
\item[See also:]\hyperlink{PBS_8c_4ed1561beb4965259f719329b6662a1d}{PBS\_\-crashHandlerSet()}. \end{Desc}


References \_\-PBS\_\-crashCtx::msr, \_\-PBS\_\-crashCtx::parameter, \_\-PBS\_\-crashCtx::pc, \_\-PBS\_\-crashCtx::reason, \_\-PBS\_\-crashCtx::sp, \_\-PBS\_\-crashCtx::tid, and \_\-PBS\_\-crashCtx::tim.

Referenced by PBS\_\-crashHandlerSet().\hypertarget{PBS_8c_ad8d853e54436c5f4edb104eb4f9b08f}{
\index{PBS.c@{PBS.c}!PBS\_\-fast\_\-clear@{PBS\_\-fast\_\-clear}}
\index{PBS\_\-fast\_\-clear@{PBS\_\-fast\_\-clear}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-fast\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void PBS\_\-fast\_\-clear (void $\ast$ {\em ptr}, \/  unsigned int {\em nbytes})}}
\label{PBS_8c_ad8d853e54436c5f4edb104eb4f9b08f}


Clears (Zeroes) the specified memory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ptr}]Pointer to the memory to zero \item[{\em nbytes}]The number of bytes to zero\end{description}
\end{Desc}
\begin{Desc}
\item[]This provides a fast way of zeroing large chunks of memory on PPC platforms using the {\em dcbz\/} instruction. This instruction zeroes a cache line at a time. The savings in speed varies by processor, but factors of 5 or more are in the ballpark, saturating out at a factor of 2 once the data cache size is exceeded (32Kbytes).\end{Desc}
\begin{Desc}
\item[]On other platforms, the library supplied routine is used.\end{Desc}
\begin{Desc}
\item[Warning:]On PPC platforms, this will work if and only if the memory being cleared is cache enabled. For the most part this is not a problem since usually all memory but memory mapped to IO space and set aside for driver use is marked cacheable. This routine does check to make sure the data cache is globally enabled. If not, the generic clear routine is called. The routine is protected if the data cache is globally disabled, in this case, dropping make and using the generic routine. \end{Desc}
\hypertarget{PBS_8c_2922756cb06c398efb39f112a5f32e67}{
\index{PBS.c@{PBS.c}!PBS\_\-initialize@{PBS\_\-initialize}}
\index{PBS\_\-initialize@{PBS\_\-initialize}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-initialize}]{\setlength{\rightskip}{0pt plus 5cm}int PBS\_\-initialize (int {\em wut\_\-tmr\_\-cnt}, \/  int {\em keepalive\_\-period})}}
\label{PBS_8c_2922756cb06c398efb39f112a5f32e67}


One-time PBS library initialization routine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wut\_\-tmr\_\-cnt}]The number of WUT timers to keep in the system pool. If specified as 0, a default value of 256 will be used. \item[{\em keepalive\_\-period}]The period (in nanoseconds) of the periodic keepalive timer. If specified as 0, a default value of 20,000,000, corresponding to 50Hz will be used.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Status, 1 indicates PBS was already initialized\end{Desc}
This is a one-time initialization of the PBS library. This call not only initializes static resources, but also replaces the VxWorks decrement counter interrupt routine (the 'timer') with the high resolution WUT timers. 

References PBS\_\-initialize2().

Referenced by PBS\_\-configure().\hypertarget{PBS_8c_b3f4d121127160446521c2e17690d99a}{
\index{PBS.c@{PBS.c}!PBS\_\-initialize2@{PBS\_\-initialize2}}
\index{PBS\_\-initialize2@{PBS\_\-initialize2}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-initialize2}]{\setlength{\rightskip}{0pt plus 5cm}int PBS\_\-initialize2 (int {\em wut\_\-tmr\_\-cnt}, \/  int {\em keepalive\_\-period}, \/  {\bf MBA\_\-create\_\-cb} {\em mba\_\-create}, \/  void $\ast$ {\em mba\_\-prm})}}
\label{PBS_8c_b3f4d121127160446521c2e17690d99a}


One-time PBS library initialization routine. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wut\_\-tmr\_\-cnt}]The number of WUT timers to keep in the system pool. If specified as 0, a default value of 256 will be used. \item[{\em keepalive\_\-period}]The period (in nanoseconds) of the periodic keepalive timer. If specified as 0, a default value of 20,000,000, corresponding to 50Hz will be used.\item[{\em mba\_\-create}]Alternate MBA partition creation routine. If specified as NULL, a default creation routine will be used and {\em prm\/} will be interpretted as a list of bad blocks, {\em i.e\/}. of type MBA\_\-badBlockList.\item[{\em mba\_\-prm}]Arbitrary parameter passed to the MBA partition creation routine.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Status, 1 indicates PBS was already initialized\end{Desc}
This is a one-time initialization of the PBS library. This call not only initializes static resources, but also replaces the VxWorks decrement counter interrupt routine (the 'timer') with the high resolution WUT timers. 

References MBA\_\-initialize(), PBS\_\-CRASH\_\-HANDLER\_\-DEFAULT, PBS\_\-crashHandlerSet(), PbsInitialized, PTS\_\-frequency(), PTS\_\-GETS, PTS\_\-initialize(), TASK\_\-sys\_\-init(), TAU\_\-initialize(), TBD\_\-initialize(), WCT\_\-K\_\-NSECS\_\-IN\_\-A\_\-SEC, WCT\_\-set(), WUT\_\-sys\_\-connect(), and WUT\_\-sys\_\-init().

Referenced by PBS\_\-configure(), and PBS\_\-initialize().\hypertarget{PBS_8c_62f0edafbc05e190e8f9af709a12744a}{
\index{PBS.c@{PBS.c}!PBS\_\-panic@{PBS\_\-panic}}
\index{PBS\_\-panic@{PBS\_\-panic}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-panic}]{\setlength{\rightskip}{0pt plus 5cm}void PBS\_\-panic (unsigned int {\em reason}, \/  unsigned int {\em parameter}, \/  void $\ast$ {\em pc}, \/  unsigned int {\em options}, \/  const char $\ast$ {\em string})}}
\label{PBS_8c_62f0edafbc05e190e8f9af709a12744a}


Routine to initiate a panic reboot. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em reason}]An application specific reason for the reboot. For example, this may identify the reason why the software is in a panic. \item[{\em parameter}]An additional opaque user application parameter \item[{\em pc}]The PC of where the reboot panic originated. Typically one would use PBS\_\-PC() to get fill this value. \item[{\em options}]A set options. Set \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_d7f34d389040bd2d9f88269857e29d82}{PBS\_\-crashOptions} for further details. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]An arbitrary user string. This is used iff there is an active PBS crash handler, in which case it is merely passed through to it.\end{description}
\end{Desc}
This routine is typically called when a piece of application code finds itself confronted with a software or hardware error which it cannot handle.

This routine will\begin{enumerate}
\item fill out the remaining fields of the PCB\_\-crashCtx block\item callback any user supplied PBS\_\-crashHandler, see \begin{Desc}
\item[See also:]\hyperlink{PBS_8h_4ed1561beb4965259f719329b6662a1d}{PBS\_\-crashHandlerSet} ().\end{Desc}
\item call the underlying OS dependent reboot or abort routine. \end{enumerate}


References PBS\_\-CRASH\_\-TYPE\_\-PANIC, and PBS\_\-LOCK.

Referenced by BUG\_\-check().\hypertarget{PBS_8c_8378c4e97f00cca6b3854d4b3e6d00ea}{
\index{PBS.c@{PBS.c}!PBS\_\-reboot@{PBS\_\-reboot}}
\index{PBS\_\-reboot@{PBS\_\-reboot}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-reboot}]{\setlength{\rightskip}{0pt plus 5cm}void PBS\_\-reboot (unsigned int {\em reason}, \/  unsigned int {\em parameter}, \/  void $\ast$ {\em pc}, \/  unsigned int {\em options}, \/  const char $\ast$ {\em string})}}
\label{PBS_8c_8378c4e97f00cca6b3854d4b3e6d00ea}


Routine to initiate a commanded reboot. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]An arbitrary user string. This is used iff there is an active PBS crash handler, in which case it is merely passed through to it. \item[{\em reason}]An command specific reason for the reboot. For example this may identify the source of the reboot command \item[{\em parameter}]An additional opaque user parameter \item[{\em pc}]The PC of where the reboot command originated. Typically one would use PBS\_\-PC() to get fill this value. \item[{\em options}]A set options. See \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]\hyperlink{PBS_8h_d7f34d389040bd2d9f88269857e29d82}{PBS\_\-crashOptions} for further details.\end{Desc}
This routine is called when a command instructing the OS to reboot has been received.

This routine will\begin{enumerate}
\item fill out the remaining fields of the PCB\_\-crashCtx block\item callback any user supplied PBS\_\-crashHandler, see \begin{Desc}
\item[See also:]\hyperlink{PBS_8h_4ed1561beb4965259f719329b6662a1d}{PBS\_\-crashHandlerSet} ().\end{Desc}
\item call the underlying OS dependent reboot or abort routine. \end{enumerate}


References PBS\_\-CRASH\_\-TYPE\_\-COMMAND, and PBS\_\-LOCK.\hypertarget{PBS_8c_0cc597d80b5d0e321cc9fbe123f621f8}{
\index{PBS.c@{PBS.c}!PBS\_\-shutdown@{PBS\_\-shutdown}}
\index{PBS\_\-shutdown@{PBS\_\-shutdown}!PBS.c@{PBS.c}}
\subsubsection[{PBS\_\-shutdown}]{\setlength{\rightskip}{0pt plus 5cm}int PBS\_\-shutdown (void)}}
\label{PBS_8c_0cc597d80b5d0e321cc9fbe123f621f8}


Shuts down the PBS facility. 

\begin{Desc}
\item[Warning:]This function is only meant to be used during development. Its main use is to allow the semi-graceful reloading of PBS in the VxWorks environment. \end{Desc}


References PbsInitialized, TASK\_\-sys\_\-shutdown(), TAU\_\-shutdown(), TBD\_\-destroy(), and WUT\_\-sys\_\-shutdown().\hypertarget{PBS_8c_9731900acfa8666398d006a17ea97321}{
\index{PBS.c@{PBS.c}!TASK\_\-sys\_\-init@{TASK\_\-sys\_\-init}}
\index{TASK\_\-sys\_\-init@{TASK\_\-sys\_\-init}!PBS.c@{PBS.c}}
\subsubsection[{TASK\_\-sys\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}int TASK\_\-sys\_\-init (void)}}
\label{PBS_8c_9731900acfa8666398d006a17ea97321}


Performs one time only initialization of the TASK facility. 

\begin{Desc}
\item[Returns:]Status \end{Desc}


References task\_\-create\_\-hook(), and task\_\-delete\_\-hook().

Referenced by PBS\_\-initialize2().\hypertarget{PBS_8c_c68554e999802609b56498af6a01e4e5}{
\index{PBS.c@{PBS.c}!TASK\_\-sys\_\-shutdown@{TASK\_\-sys\_\-shutdown}}
\index{TASK\_\-sys\_\-shutdown@{TASK\_\-sys\_\-shutdown}!PBS.c@{PBS.c}}
\subsubsection[{TASK\_\-sys\_\-shutdown}]{\setlength{\rightskip}{0pt plus 5cm}int TASK\_\-sys\_\-shutdown (void)}}
\label{PBS_8c_c68554e999802609b56498af6a01e4e5}


Performs the shutdown of the TASK facility. This essentially undoes what TASK\_\-sys\_\-init did. 

\begin{Desc}
\item[Returns:]Status \end{Desc}


References task\_\-create\_\-hook(), and task\_\-delete\_\-hook().

Referenced by PBS\_\-shutdown().