#include "gm.h"
#include "gm_call_trace.h"
#include "gm_config.h"
#include "gm_internal_funcs.h"
Data Structures | |
struct | gm_on_exit_record |
Typedefs | |
typedef gm_on_exit_record | gm_on_exit_record_t |
Functions | |
GM_ENTRY_POINT gm_status_t | gm_on_exit (gm_on_exit_callback_t callback, void *arg) |
This file contains the GM API function gm_on_exit().
|
List element storing the details of a callback that should be called upon exit. |
|
gm_on_exit() is like Linux on_exit(). This function registers a callback so that `CALLBACK(STATUS,ARG)' is called when the program exits. Callbacks are called in the reverse of the order of registration. This function is also somewhat similar to BSD `atexit()'. Call the callbacks in the reverse order registered inside gm_exit(), passing GM exit status and registered argument to the callback.
|