EM-ODP  3.7.0
Event Machine on ODP
event_machine_dispatcher.h File Reference
Include dependency graph for event_machine_dispatcher.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  em_dispatch_duration_t
 
struct  em_dispatch_opt_t
 EM dispatch options. More...
 
struct  em_dispatch_results_t
 Dispatch results. More...
 

Typedefs

typedef void(* em_dispatch_enter_func_t) (em_eo_t eo, void **eo_ctx, em_event_t events[], int num, em_queue_t *queue, void **q_ctx)
 
typedef void(* em_dispatch_exit_func_t) (em_eo_t eo)
 

Enumerations

enum  em_dispatch_duration_select_t {
  EM_DISPATCH_DURATION_FOREVER = 0, EM_DISPATCH_DURATION_ROUNDS = 1, EM_DISPATCH_DURATION_NS = 2, EM_DISPATCH_DURATION_EVENTS = 4,
  EM_DISPATCH_DURATION_NO_EVENTS_ROUNDS = 8, EM_DISPATCH_DURATION_NO_EVENTS_NS = 16, EM_DISPATCH_DURATION_LAST
}
 EM dispatch duration selection flags. More...
 

Functions

void em_dispatch_opt_init (em_dispatch_opt_t *opt)
 Initialize the EM dispatch options. More...
 
em_status_t em_dispatch_duration (const em_dispatch_duration_t *duration, const em_dispatch_opt_t *opt, em_dispatch_results_t *results)
 Run the EM dispatcher for a certain duration with options. More...
 
em_status_t em_dispatch_ns (uint64_t ns, const em_dispatch_opt_t *opt, em_dispatch_results_t *results)
 Run the EM dispatcher for a given amount of time (in nanoseconds). More...
 
em_status_t em_dispatch_events (uint64_t events, const em_dispatch_opt_t *opt, em_dispatch_results_t *results)
 Run the EM dispatcher until a given number of events have been dispatched. More...
 
em_status_t em_dispatch_rounds (uint64_t rounds, const em_dispatch_opt_t *opt, em_dispatch_results_t *results)
 Run the EM dispatcher for a given number of dispatch-rounds. More...
 
uint64_t em_dispatch (uint64_t rounds)
 
em_status_t em_dispatch_register_enter_cb (em_dispatch_enter_func_t func)
 
em_status_t em_dispatch_unregister_enter_cb (em_dispatch_enter_func_t func)
 
em_status_t em_dispatch_register_exit_cb (em_dispatch_exit_func_t func)
 
em_status_t em_dispatch_unregister_exit_cb (em_dispatch_exit_func_t func)