globus_callback.h - Man Page

Globus Callback API.

Synopsis

#include 'globus_common_include.h'
#include 'globus_module.h'
#include 'globus_time.h'

Macros

#define GLOBUS_CALLBACK_MODULE
Module descriptor.
#define GLOBUS_POLL_MODULE
Module descriptor.

Convenience Macros

#define globus_callback_poll(a)
Poll the global callback space.
#define globus_poll_blocking()
Blocking poll of the global callback space.
#define globus_poll_nonblocking()
Nonblocking poll of the global callback space.
#define globus_poll()
Nonblocking poll of the global callback space.
#define globus_signal_poll()
Wake up callback polling thread.
#define globus_callback_register_oneshot( callback_handle,  delay_time,  callback_func,  callback_user_arg)
Register a oneshot function in the global callback space.
#define globus_callback_register_periodic( callback_handle,  delay_time,  period,  callback_func,  callback_user_arg)
Register a periodic function in the global callback space.
#define globus_callback_register_signal_handler( signum,  persist,  callback_func,  callback_user_arg)
Register a signal handler in the global callback space.

Typedefs

typedef int globus_callback_handle_t
Periodic callback handle.
typedef int globus_callback_space_t
Callback space handle.
typedef struct globus_l_callback_space_attr_s * globus_callback_space_attr_t
Callback space attribute.

Callback Prototypes

typedef void(* globus_callback_func_t) (void *user_arg)
Globus callback prototype.

Enumerations

enum globus_callback_error_type_t { GLOBUS_CALLBACK_ERROR_INVALID_CALLBACK_HANDLE = 1024, GLOBUS_CALLBACK_ERROR_INVALID_SPACE, GLOBUS_CALLBACK_ERROR_MEMORY_ALLOC, GLOBUS_CALLBACK_ERROR_INVALID_ARGUMENT, GLOBUS_CALLBACK_ERROR_ALREADY_CANCELED, GLOBUS_CALLBACK_ERROR_NO_ACTIVE_CALLBACK }
Error types.

Functions

Oneshot Callbacks

globus_result_t globus_callback_space_register_oneshot (globus_callback_handle_t *callback_handle, const globus_reltime_t *delay_time, globus_callback_func_t callback_func, void *callback_user_arg, globus_callback_space_t space)
Register a oneshot some delay from now.

Periodic Callbacks

globus_result_t globus_callback_space_register_periodic (globus_callback_handle_t *callback_handle, const globus_reltime_t *delay_time, const globus_reltime_t *period, globus_callback_func_t callback_func, void *callback_user_arg, globus_callback_space_t space)
Register a periodic callback.
globus_result_t globus_callback_unregister (globus_callback_handle_t callback_handle, globus_callback_func_t unregister_callback, void *unreg_arg, globus_bool_t *active)
Unregister a callback.
globus_result_t globus_callback_adjust_oneshot (globus_callback_handle_t callback_handle, const globus_reltime_t *new_delay)
Adjust the delay of a oneshot callback.
globus_result_t globus_callback_adjust_period (globus_callback_handle_t callback_handle, const globus_reltime_t *new_period)
Adjust the period of a periodic callback.

Callback Polling

void globus_callback_space_poll (const globus_abstime_t *timestop, globus_callback_space_t space)
Poll for ready callbacks.
void globus_callback_signal_poll ()
Signal the poll.

Miscellaneous

#define GLOBUS_CALLBACK_GLOBAL_SPACE
Global callback space.
#define GLOBUS_SIGNAL_INTERRUPT
enum globus_callback_space_behavior_t { GLOBUS_CALLBACK_SPACE_BEHAVIOR_SINGLE, GLOBUS_CALLBACK_SPACE_BEHAVIOR_SERIALIZED, GLOBUS_CALLBACK_SPACE_BEHAVIOR_THREADED }
Callback space behaviors describe how a space behaves.
globus_bool_t globus_callback_get_timeout (globus_reltime_t *time_left)
Get the amount of time left in a callback.
globus_bool_t globus_callback_has_time_expired ()
See if there is remaining time in a callback.
globus_bool_t globus_callback_was_restarted ()
See if a callback has been restarted.
globus_result_t globus_callback_space_init (globus_callback_space_t *space, globus_callback_space_attr_t attr)
Initialize a user space.
globus_result_t globus_callback_space_reference (globus_callback_space_t space)
Take a reference to a space.
globus_result_t globus_callback_space_destroy (globus_callback_space_t space)
Destroy a reference to a user space.
globus_result_t globus_callback_space_attr_init (globus_callback_space_attr_t *attr)
Initialize a space attr.
globus_result_t globus_callback_space_attr_destroy (globus_callback_space_attr_t attr)
Destroy a space attr.
globus_result_t globus_callback_space_attr_set_behavior (globus_callback_space_attr_t attr, globus_callback_space_behavior_t behavior)
Set the behavior of a space.
globus_result_t globus_callback_space_attr_get_behavior (globus_callback_space_attr_t attr, globus_callback_space_behavior_t *behavior)
Get the behavior associated with an attr.
globus_result_t globus_callback_space_get (globus_callback_space_t *space)
Retrieve the space of a currently running callback.
int globus_callback_space_get_depth (globus_callback_space_t space)
Retrieve the current nesting level of a space.
globus_bool_t globus_callback_space_is_single (globus_callback_space_t space)
See if the specified space is a single threaded behavior space.
globus_result_t globus_callback_space_register_signal_handler (int signum, globus_bool_t persist, globus_callback_func_t callback_func, void *callback_user_arg, globus_callback_space_t space)
Fire a callback when the specified signal is received.
globus_result_t globus_callback_unregister_signal_handler (int signum, globus_callback_func_t unregister_callback, void *unreg_arg)
Unregister a signal handling callback.
void globus_callback_add_wakeup_handler (void(*wakeup)(void *), void *user_arg)
Register a wakeup handler with callback library.

Detailed Description

Globus Callback API.

Author

Generated automatically by Doxygen for globus_common from the source code.

Info

Version 18.14 globus_common