Macros | Typedefs | Functions | Variables
error.c File Reference

Various error-handling functions. More...

#include <GKlib.h>
Include dependency graph for error.c:

Go to the source code of this file.

Macros

#define _GK_ERROR_C_
 
#define MAX_JBUFS   128
 

Typedefs

typedef void(* gksighandler_t) (int)
 

Functions

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

Variables

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

Detailed Description

Various error-handling functions.

This file contains functions dealing with error reporting and termination

Author
George
Date
1/1/2007
Version
$Id: error.c 10711 2011-08-31 22:23:04Z karypis $ 

Definition in file error.c.

Macro Definition Documentation

#define _GK_ERROR_C_
Value:
/* this is needed to properly declare the gk_jub* variables
as an extern function in GKlib.h */

Definition at line 13 of file error.c.

#define MAX_JBUFS   128

Definition at line 21 of file error.c.

Typedef Documentation

typedef void(* gksighandler_t) (int)

Definition at line 26 of file error.c.

Function Documentation

void errexit ( char *  f_str,
  ... 
)

This function prints an error message and exits

Definition at line 54 of file error.c.

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

This function prints an error message and raises a signum signal

Definition at line 77 of file error.c.

void gk_NonLocalExit_Handler ( int  signum)

Definition at line 166 of file error.c.

void gk_set_exit_on_error ( int  value)

This function sets the gk_exit_on_error variable

Definition at line 43 of file error.c.

void gk_SetSignalHandlers ( )

Definition at line 145 of file error.c.

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 135 of file error.c.

int gk_sigtrap ( )

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

Definition at line 98 of file error.c.

int gk_siguntrap ( )

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

Definition at line 116 of file error.c.

char* gk_strerror ( int  errnum)

Thread-safe implementation of strerror()

Definition at line 175 of file error.c.

void gk_UnsetSignalHandlers ( )

Definition at line 155 of file error.c.

void PrintBackTrace ( )

Definition at line 198 of file error.c.

Variable Documentation

__thread int gk_cur_jbufs =-1

Definition at line 22 of file error.c.

int gk_exit_on_error = 1
static

Definition at line 36 of file error.c.

__thread jmp_buf gk_jbuf

Definition at line 24 of file error.c.

__thread jmp_buf gk_jbufs[MAX_JBUFS]

Definition at line 23 of file error.c.

__thread gksighandler_t old_SIGERR_handler
static

Definition at line 30 of file error.c.

__thread gksighandler_t old_SIGERR_handlers[MAX_JBUFS]
static

Definition at line 32 of file error.c.

__thread gksighandler_t old_SIGMEM_handler
static

Definition at line 29 of file error.c.

__thread gksighandler_t old_SIGMEM_handlers[MAX_JBUFS]
static

Definition at line 31 of file error.c.



gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:29