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 void(* gksighandler_t)(int) |
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().
void gk_errexit | ( | int | signum, | |
char * | f_str, | |||
... | ||||
) |
This function prints an error message and raises a signum signal
Definition at line 79 of file error.c.
References gk_exit_on_error.
Referenced by AllocateKWayPartitionMemory(), AllocateRefinementWorkSpace(), CoarsenGraph(), CoarsenGraphNlevels(), ComputeKWayBoundary(), ComputeKWayPartitionParams(), ComputeSubDomainGraph(), CreateGraphDual(), CreateGraphNodal(), EliminateComponents(), EliminateSubDomainEdges(), gk_csr_ComputeSimilarity(), gk_csr_ComputeSquaredNorms(), gk_csr_ComputeSums(), gk_csr_CreateIndex(), gk_csr_GetSimilarRows(), gk_csr_LowFilter(), gk_csr_Prune(), gk_csr_Read(), gk_csr_Scale(), gk_csr_SortIndices(), gk_csr_TopKPlusFilter(), gk_csr_Write(), gk_csr_ZScoreFilter(), gk_dreadfilebin(), gk_freadfilebin(), gk_gkmcoreAdd(), gk_gkmcoreDel(), gk_gkmcorePop(), gk_graph_ComputeBestFOrdering(), gk_graph_ComputeBestFOrdering0(), gk_graph_Prune(), gk_graph_Read(), gk_graph_SortAdjacencies(), gk_graph_Write(), gk_i32readfilebin(), gk_i64readfilebin(), gk_malloc(), gk_mcoreAdd(), gk_mcoreDel(), gk_mcorePop(), gk_realloc(), GKDecodeBase64(), GKEncodeBase64(), Greedy_KWayOptimize(), HTable_SearchAndDelete(), Init2WayPartition(), InitKWayPartitioning(), InitSeparator(), METIS_PartGraphKway(), MlevelKWayPartitioning(), ProjectKWayPartition(), Refine2WayNode(), and SetupCtrl().
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().
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().
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().
void gk_SetSignalHandlers | ( | ) |
Definition at line 147 of file error.c.
References gk_NonLocalExit_Handler(), old_SIGERR_handler, and old_SIGMEM_handler.
void gk_UnsetSignalHandlers | ( | ) |
void gk_NonLocalExit_Handler | ( | int | signum | ) |
Definition at line 168 of file error.c.
References gk_jbuf.
Referenced by gk_SetSignalHandlers().
char* gk_strerror | ( | int | errnum | ) |
void PrintBackTrace | ( | ) |
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] |
CMK_THREADLOCAL jmp_buf gk_jbuf |
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] |
CMK_THREADLOCAL gksighandler_t old_SIGERR_handlers[MAX_JBUFS] [static] |
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().