17 #ifndef GLOBUS_CALLBACK_H 18 #define GLOBUS_CALLBACK_H 54 #define GLOBUS_CALLBACK_MODULE (&globus_i_callback_module) 65 #define GLOBUS_POLL_MODULE GLOBUS_CALLBACK_MODULE 146 #define globus_callback_poll(a) \ 147 globus_callback_space_poll((a), GLOBUS_CALLBACK_GLOBAL_SPACE) 160 #define globus_poll_blocking() \ 161 globus_callback_poll(&globus_i_abstime_infinity) 174 #define globus_poll_nonblocking() \ 175 globus_callback_poll(&globus_i_abstime_zero) 188 #define globus_poll() \ 189 globus_poll_nonblocking() 201 #define globus_signal_poll() \ 202 globus_callback_signal_poll() 215 #define globus_callback_register_oneshot( \ 220 globus_callback_space_register_oneshot( \ 224 (callback_user_arg), \ 225 GLOBUS_CALLBACK_GLOBAL_SPACE) 238 #define globus_callback_register_periodic( \ 244 globus_callback_space_register_periodic( \ 249 (callback_user_arg), \ 250 GLOBUS_CALLBACK_GLOBAL_SPACE) 264 #define globus_callback_register_signal_handler( \ 269 globus_callback_space_register_signal_handler( \ 273 (callback_user_arg), \ 274 GLOBUS_CALLBACK_GLOBAL_SPACE) 359 globus_callback_handle_t * callback_handle,
360 const globus_reltime_t * delay_time,
362 void * callback_user_arg,
363 globus_callback_space_t space);
411 globus_callback_handle_t * callback_handle,
412 const globus_reltime_t * delay_time,
413 const globus_reltime_t * period,
415 void * callback_user_arg,
416 globus_callback_space_t space);
464 globus_callback_handle_t callback_handle,
498 globus_callback_handle_t callback_handle,
499 const globus_reltime_t * new_delay);
535 globus_callback_handle_t callback_handle,
536 const globus_reltime_t * new_period);
587 const globus_abstime_t * timestop,
588 globus_callback_space_t space);
637 globus_reltime_t * time_left);
694 #define GLOBUS_CALLBACK_GLOBAL_SPACE -2 767 globus_callback_space_t * space,
768 globus_callback_space_attr_t attr);
789 globus_callback_space_t space);
816 globus_callback_space_t space);
837 globus_callback_space_attr_t * attr);
855 globus_callback_space_attr_t attr);
875 globus_callback_space_attr_t attr,
876 globus_callback_space_behavior_t behavior);
899 globus_callback_space_attr_t attr,
900 globus_callback_space_behavior_t * behavior);
916 globus_callback_space_t * space);
931 globus_callback_space_t space);
946 globus_callback_space_t space);
964 #define GLOBUS_SIGNAL_INTERRUPT SIGINT 966 #define GLOBUS_SIGNAL_INTERRUPT 0 1009 void * callback_user_arg,
1010 globus_callback_space_t space);
1071 void (*wakeup)(
void *),
globus_callback_space_behavior_t
Callback space behaviors describe how a space behaves.
Definition: globus_callback.h:726
Definition: globus_callback.h:89
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.
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_signal_handler(int signum, globus_callback_func_t unregister_callback, void *unreg_arg)
Unregister a signal handling callback.
Definition: globus_callback.h:735
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.
Definition: globus_callback.h:85
globus_bool_t globus_callback_get_timeout(globus_reltime_t *time_left)
Get the amount of time left in a callback.
Definition: globus_callback.h:87
Definition: globus_callback.h:81
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
int globus_callback_space_get_depth(globus_callback_space_t space)
Retrieve the current nesting level of a space.
int globus_callback_handle_t
Periodic callback handle.
Definition: globus_callback.h:102
globus_result_t globus_callback_space_init(globus_callback_space_t *space, globus_callback_space_attr_t attr)
Initialize a user space.
Reference Counting Module Activation and Deactivation.
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_callback_error_type_t
Error types.
Definition: globus_callback.h:78
void globus_callback_add_wakeup_handler(void(*wakeup)(void *), void *user_arg)
Register a wakeup handler with callback library.
Definition: globus_callback.h:91
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_space_reference(globus_callback_space_t space)
Take a reference to a 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_bool_t globus_callback_space_is_single(globus_callback_space_t space)
See if the specified space is a single threaded behavior space.
void globus_callback_space_poll(const globus_abstime_t *timestop, globus_callback_space_t space)
Poll for ready callbacks.
globus_bool_t globus_callback_has_time_expired()
See if there is remaining time in a callback.
globus_result_t globus_callback_space_attr_init(globus_callback_space_attr_t *attr)
Initialize a space attr.
Definition: globus_callback.h:731
Definition: globus_callback.h:83
Definition: globus_callback.h:737
void globus_callback_signal_poll()
Signal the poll.
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_destroy(globus_callback_space_attr_t attr)
Destroy a space attr.
uint32_t globus_result_t
Definition: globus_types.h:99
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.
struct globus_l_callback_space_attr_s * globus_callback_space_attr_t
Callback space attribute.
Definition: globus_callback.h:121
globus_result_t globus_callback_space_destroy(globus_callback_space_t space)
Destroy a reference to a user space.
globus_bool_t globus_callback_was_restarted()
See if a callback has been restarted.
void(* globus_callback_func_t)(void *user_arg)
Globus callback prototype.
Definition: globus_callback.h:314
globus_result_t globus_callback_space_get(globus_callback_space_t *space)
Retrieve the space of a currently running callback.
int globus_callback_space_t
Callback space handle.
Definition: globus_callback.h:112
Module Descriptor.
Definition: globus_module.h:71