rl_add_action_callback. STMicroelectronics STxP70
تبلیغات
تبلیغات
UM1237 Relocatable loader library
rl_add_action_callback
Definition:
Add a user action callback function to the user action callback list
typedef unsigned int rl_action_t;
#define RL_ACTION_UNLOAD 2
Arguments:
Returns:
Description:
typedef int rl_action_func_t (
rl_handle_t *handle,
rl_action_t action,
void *cookie); int rl_add_action_callback(
rl_action_t action_mask,
rl_action_func_t *callback_fn,
void *callback_cookie); action_mask
The set of actions for which the callback function must be called.
callback_fn
The user specified callback function.
callback_cookie
The argument to pass to the function.
Returns 0 for success, -1 for failure.
The rl_add_action_callback() function adds a user action callback function to the user action callback list. It can be called multiple times with different callback functions. The same callback function cannot be added more than once.
For each defined action, each callback function is called in the order it was added into the callback list. The callback functions are not attached to a particular module and are called for any further loaded/unloaded modules.
This function returns 0 on success and -1 on failure. It does not set any error codes.
This function can fail if a callback function is already in the callback list or if the program goes out of memory.
The rl_action_t type defines the action flags for module loading/unloading and is passed to the action function callback. The action flags can be OR-ed to create an action mask that can be passed to the function rl_add_action_callback(). The action defined are:
RL_ACTION_LOAD
The callback is called just after the module has been loaded in memory and cache has been synchronized. No module code has been executed.
RL_ACTION_UNLOAD
The callback is called just before the module is unloaded from memory. No module code will be executed after this point.
RL_ACTION_ALL
The callback will be called for any action.
8027948 Rev 15 153/166
دانلود
تبلیغات