/** @file  psAbort.h
 *
 *  @brief Contains the declarations for the abort function
 *
 *  The abort logging and handling shall be performed by psAbort function.
 *  This will allow for consistent handling of other software units
 *  needing to abort from program execution.
 *
 *  @author Eric Van Alst, MHPCC
 *
 *  $Revision: 1.13 $ $Name: not supported by cvs2svn $
 *  $Date: 2007-01-23 22:47:23 $
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
 */

#ifndef PS_ABORT_H
#define PS_ABORT_H

/// @addtogroup SysUtils System Utilities
/// @{

/** Reports an abort message to logging facility
 *
 *  This function will invoke the psLogMsg function with a level of
 *  PS_LOG_ABORT and pass the parameters name and fmt to generate a proper
 *  log message.  After logging, this function will call system abort
 *  function to abnormally terminate the program.
 *
 *  @return  void No return value
 *
 */
#ifdef __GNUC__
void psAbort(
    const char *name,                  ///< Source of abort such as file or function detected
    const char *format,                   ///< A printf style formatting statement defining msg
    ...
) __attribute__((format(printf, 2, 3)));
#else // __GNUC__
void psAbort(
    const char *name,                  ///< Source of abort such as file or function detected
    const char *format,                   ///< A printf style formatting statement defining msg
    ...
);
#endif // __GNUC__

/// @}
#endif // #ifndef PS_ABORT_H
