\hypertarget{BUG_8c}{
\section{BUG.c File Reference}
\label{BUG_8c}\index{BUG.c@{BUG.c}}
}
Defines a set of routines for bugchecking the CPU.  


{\tt \#include $<$PBS/BUG.h$>$}\par
{\tt \#include $<$PBS/REG.h$>$}\par
{\tt \#include $<$PBS/PBS.h$>$}\par
{\tt \#include $<$stdarg.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{BUG_8c_adc1809084d60fd3a63511d86d3d81db}{BUG\_\-check} (int status, const char $\ast$reason,...)
\begin{CompactList}\small\item\em Simple routine to declare a BUG check. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Defines a set of routines for bugchecking the CPU. 

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


\footnotesize\begin{verbatim}
    CVS $Id: BUG.c,v 1.4 2011/03/24 23:05:46 apw Exp $
\end{verbatim}
\normalsize


This routine is deprecated, being replaced by PBS\_\-panic 

\subsection{Function Documentation}
\hypertarget{BUG_8c_adc1809084d60fd3a63511d86d3d81db}{
\index{BUG.c@{BUG.c}!BUG\_\-check@{BUG\_\-check}}
\index{BUG\_\-check@{BUG\_\-check}!BUG.c@{BUG.c}}
\subsubsection[{BUG\_\-check}]{\setlength{\rightskip}{0pt plus 5cm}void BUG\_\-check (int {\em status}, \/  const char $\ast$ {\em reason}, \/   {\em ...})}}
\label{BUG_8c_adc1809084d60fd3a63511d86d3d81db}


Simple routine to declare a BUG check. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]Status code indicating the reason for the bug check \item[{\em reason}]A {\em printf()\/} style format string followed by the arguments\item[{\em status}]A status value to be associated with the failure \item[{\em reason}]A C-style formatting string\end{description}
\end{Desc}
Prints a simple message consisting of the status value and a string. The string is formatted using the {\em reason\/} as a C-style formatting string which consumes the remaining arguments.

{\bf EXAMPLE} \par
 \par
 

\footnotesize\begin{verbatim}
BUG_check (0xdeadbeef,
          "Mad Cow Disease takes over GFS inflicting %d programmers\n",
          nProgrammers);
\end{verbatim}
\normalsize
 \par
 

References PBS\_\-panic(), and REG\_\-LR.

Referenced by arm\_\-handler(), arm\_\-handler\_\-nxt\_\-wut(), lock\_\-que(), RW\_\-\_\-lock(), RW\_\-\_\-lock2(), RW\_\-\_\-unlock(), RW\_\-\_\-unlock2(), RW\_\-\_\-wait(), TASK\_\-activate(), TASK\_\-resume(), TASK\_\-suspend(), TASK\_\-wait(), TASK\_\-wrapper(), unlock\_\-que(), WUT\_\-sys\_\-handler(), and wut\_\-sys\_\-kill().