Adaptive Framework
0.9.0
|
Files | |
file | afw_os.h |
Adaptive Framework OS Specific Header for unix-like systems. | |
Functions | |
void | afw_os_environment_initialize (afw_xctx_t *xctx) |
afw_os environment initialize More... | |
afw_uint32_t | afw_os_get_pid () |
Return a process id or similar number. More... | |
const afw_utf8_t * | afw_os_get_dso_suffix () |
Return the suffix appended to dso file names for this system. More... | |
const afw_log_t * | afw_os_log_create (const afw_object_t *properties, const afw_pool_t *p, afw_xctx_t *xctx) |
Create an instance of the OS log. More... | |
const afw_log_factory_t * | afw_os_log_factory_get () |
Get the factory for OS log. More... | |
const afw_utf8_t * | afw_os_backtrace (afw_error_code_t code, int max_backtrace, afw_xctx_t *xctx) |
Provide a backtrace if possible. More... | |
OS specific functions
const afw_utf8_t* afw_os_backtrace | ( | afw_error_code_t | code, |
int | max_backtrace, | ||
afw_xctx_t * | xctx | ||
) |
Provide a backtrace if possible.
code | Error code or 0. Code afw_error_code_memory or others might influence whether producing backtrace is possible. |
max_backtrace. | |
xctx | of caller. |
IMPORTANT Implementation of this function must not do anything that might throw an error or change xctx->error or a recursive error producing a stack overflow will occur.
If max_backtrace is -1 or greater than the implementation's max, the max is used. If 0 is specifed, no trace occurs.
Definition at line 729 of file nix/afw_os.c.
void afw_os_environment_initialize | ( | afw_xctx_t * | xctx | ) |
afw_os environment initialize
xctx | of caller |
This is called when the Adaptive Framework is being initialized. Pool xctx->p will last for the life of the environment. Any afw_environment_register functions can be called from here. One possible use is to register an afw_log_factory so that the system's log can be configured by environment configuration.
Definition at line 607 of file nix/afw_os.c.
const afw_utf8_t* afw_os_get_dso_suffix | ( | ) |
Return the suffix appended to dso file names for this system.
Definition at line 643 of file nix/afw_os.c.
afw_uint32_t afw_os_get_pid | ( | ) |
Return a process id or similar number.
Definition at line 174 of file win/afw_os.c.
const afw_log_t* afw_os_log_create | ( | const afw_object_t * | properties, |
const afw_pool_t * | p, | ||
afw_xctx_t * | xctx | ||
) |
Create an instance of the OS log.
properties | |
p | to use for log's resources. |
xctx | of caller. |
Definition at line 75 of file nix/afw_os_log.c.
const afw_log_factory_t* afw_os_log_factory_get | ( | ) |
Get the factory for OS log.
Definition at line 67 of file nix/afw_os_log.c.