![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Support functions to allow libraries to get system errors in a threadsafe and easily debuggable way. More...
#include <freeradius-devel/util/log.h>#include <freeradius-devel/util/strerror.h>#include <freeradius-devel/util/syserror.h>#include <freeradius-devel/util/atexit.h>
Include dependency graph for syserror.c:Go to the source code of this file.
Macros | |
| #define | FR_SYSERROR_BUFSIZE (2048) |
| #define | HAVE_DEFINITION(_errno) ((_errno) < (int)(NUM_ELEMENTS(fr_syserror_macro_names))) |
Functions | |
| static int | _fr_logging_free (UNUSED void *arg) |
| static ssize_t | _fr_syserror (int num, char *buffer, size_t buff_len) |
| static char * | _fr_syserror_buffer (void) |
| char const * | fr_syserror (int num) |
| Guaranteed to be thread-safe version of strerror. | |
| char const * | fr_syserror_simple (int num) |
| Guaranteed to be thread-safe version of strerror. | |
Variables | |
| static _Thread_local char * | fr_syserror_buffer |
| static char const * | fr_syserror_macro_names [] |
| POSIX-2008 errno macros. | |
| static _Thread_local bool | logging_stop |
| Due to ordering issues we may get errors being logged from within other thread local destructors which cause a crash on exit if the logging buffer has already been freed. | |
Support functions to allow libraries to get system errors in a threadsafe and easily debuggable way.
Definition in file syserror.c.
| #define FR_SYSERROR_BUFSIZE (2048) |
Definition at line 32 of file syserror.c.
| #define HAVE_DEFINITION | ( | _errno | ) | ((_errno) < (int)(NUM_ELEMENTS(fr_syserror_macro_names))) |
Definition at line 40 of file syserror.c.
|
static |
Definition at line 46 of file syserror.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 163 of file syserror.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 220 of file syserror.c.
Here is the call graph for this function:
Here is the caller graph for this function:| char const * fr_syserror | ( | int | num | ) |
Guaranteed to be thread-safe version of strerror.
| num | errno as returned by function or from global errno. |
Definition at line 243 of file syserror.c.
Here is the call graph for this function:| char const * fr_syserror_simple | ( | int | num | ) |
Guaranteed to be thread-safe version of strerror.
| num | errno as returned by function or from global errno. |
Definition at line 291 of file syserror.c.
Here is the call graph for this function:
|
static |
Definition at line 34 of file syserror.c.
|
static |
POSIX-2008 errno macros.
Non-POSIX macros may be added, but you must check they're defined.
Definition at line 58 of file syserror.c.
|
static |
Due to ordering issues we may get errors being logged from within other thread local destructors which cause a crash on exit if the logging buffer has already been freed.
Definition at line 35 of file syserror.c.
1.9.8