PPL Logo

libs/ck-libs/metis/GKlib/error.c File Reference

Go to the source code of this file.

Typedefs

typedef void(* gksighandler_t )(int)

Functions

void gk_set_exit_on_error (int value)
void errexit (char *f_str,...)
void gk_errexit (int signum, char *f_str,...)
int gk_sigtrap ()
int gk_siguntrap ()
void gk_sigthrow (int signum)
void gk_SetSignalHandlers ()
void gk_UnsetSignalHandlers ()
void gk_NonLocalExit_Handler (int signum)
char * gk_strerror (int errnum)
 Thread-safe implementation of strerror().
void PrintBackTrace ()

Variables

CMK_THREADLOCAL int gk_cur_jbufs = -1
CMK_THREADLOCAL jmp_buf gk_jbufs [MAX_JBUFS]
CMK_THREADLOCAL jmp_buf gk_jbuf
static CMK_THREADLOCAL
gksighandler_t 
old_SIGMEM_handler
static CMK_THREADLOCAL
gksighandler_t 
old_SIGERR_handler
static CMK_THREADLOCAL
gksighandler_t 
old_SIGMEM_handlers [MAX_JBUFS]
static CMK_THREADLOCAL
gksighandler_t 
old_SIGERR_handlers [MAX_JBUFS]
static CMK_THREADLOCAL int gk_exit_on_error = 1


Typedef Documentation

typedef void(* gksighandler_t)(int)

Definition at line 28 of file error.c.


Function Documentation

void gk_set_exit_on_error ( int  value  ) 

This function sets the gk_exit_on_error variable

Definition at line 45 of file error.c.

References gk_exit_on_error.

void errexit ( char *  f_str,
  ... 
)

This function prints an error message and exits

Definition at line 56 of file error.c.

References gk_exit_on_error.

Referenced by ComputeFillIn(), gk_csr_Read(), gk_fopen(), gk_mcorePop(), gk_seq_ReadGKMODPSSM(), main(), parse_cmdline(), ReadGraph(), ReadMesh(), ReadPOVector(), ReadTPwgts(), and reorder_centroid().

Here is the caller graph for this function:

void gk_errexit ( int  signum,
char *  f_str,
  ... 
)

int gk_sigtrap (  ) 

This function sets a number of signal handlers and sets the return point of a longjmp

Definition at line 100 of file error.c.

References gk_cur_jbufs, gk_sigthrow(), old_SIGERR_handlers, and old_SIGMEM_handlers.

Referenced by METIS_MeshToDual(), METIS_MeshToNodal(), METIS_NodeND(), METIS_PartGraphKway(), METIS_PartGraphRecursive(), METIS_PartMeshDual(), and METIS_PartMeshNodal().

Here is the call graph for this function:

Here is the caller graph for this function:

int gk_siguntrap (  ) 

This function sets the handlers for the signals to their default handlers

Definition at line 118 of file error.c.

References gk_cur_jbufs, old_SIGERR_handlers, and old_SIGMEM_handlers.

Referenced by METIS_MeshToDual(), METIS_MeshToNodal(), METIS_NodeND(), METIS_PartGraphKway(), METIS_PartGraphRecursive(), METIS_PartMeshDual(), and METIS_PartMeshNodal().

Here is the caller graph for this function:

void gk_sigthrow ( int  signum  ) 

This function is the custome signal handler, which all it does is to perform a longjump to the most recent saved environment

Definition at line 137 of file error.c.

References gk_cur_jbufs, and gk_jbufs.

Referenced by gk_sigtrap().

Here is the caller graph for this function:

void gk_SetSignalHandlers (  ) 

Definition at line 147 of file error.c.

References gk_NonLocalExit_Handler(), old_SIGERR_handler, and old_SIGMEM_handler.

Here is the call graph for this function:

void gk_UnsetSignalHandlers (  ) 

Definition at line 157 of file error.c.

References old_SIGERR_handler, and old_SIGMEM_handler.

void gk_NonLocalExit_Handler ( int  signum  ) 

Definition at line 168 of file error.c.

References gk_jbuf.

Referenced by gk_SetSignalHandlers().

Here is the caller graph for this function:

char* gk_strerror ( int  errnum  ) 

Thread-safe implementation of strerror().

Definition at line 177 of file error.c.

References buf.

void PrintBackTrace (  ) 

Definition at line 208 of file error.c.

References array, free(), and size.

Here is the call graph for this function:


Variable Documentation

CMK_THREADLOCAL int gk_cur_jbufs = -1

Definition at line 24 of file error.c.

Referenced by gk_sigthrow(), gk_sigtrap(), and gk_siguntrap().

CMK_THREADLOCAL jmp_buf gk_jbufs[MAX_JBUFS]

Definition at line 25 of file error.c.

Referenced by gk_sigthrow().

CMK_THREADLOCAL jmp_buf gk_jbuf

Definition at line 26 of file error.c.

Referenced by gk_NonLocalExit_Handler().

CMK_THREADLOCAL gksighandler_t old_SIGMEM_handler [static]

Definition at line 31 of file error.c.

Referenced by gk_SetSignalHandlers(), and gk_UnsetSignalHandlers().

CMK_THREADLOCAL gksighandler_t old_SIGERR_handler [static]

Definition at line 32 of file error.c.

Referenced by gk_SetSignalHandlers(), and gk_UnsetSignalHandlers().

CMK_THREADLOCAL gksighandler_t old_SIGMEM_handlers[MAX_JBUFS] [static]

Definition at line 33 of file error.c.

Referenced by gk_sigtrap(), and gk_siguntrap().

CMK_THREADLOCAL gksighandler_t old_SIGERR_handlers[MAX_JBUFS] [static]

Definition at line 34 of file error.c.

Referenced by gk_sigtrap(), and gk_siguntrap().

CMK_THREADLOCAL int gk_exit_on_error = 1 [static]

Definition at line 38 of file error.c.

Referenced by errexit(), gk_errexit(), and gk_set_exit_on_error().


Generated on Mon Sep 21 08:05:23 2020 for Charm++ by  doxygen 1.5.5