UCX  1.6
Unified Communication X
async_fwd.h
1 
7 #ifndef UCS_ASYNC_FWD_H
8 #define UCS_ASYNC_FWD_H
9 
10 #include <ucs/config/types.h>
11 #include <ucs/time/time_def.h>
12 #include <ucs/type/status.h>
13 
14 BEGIN_C_DECLS
15 
18 typedef struct ucs_async_context ucs_async_context_t;
19 
20 
29 typedef void (*ucs_async_event_cb_t)(int id, void *arg);
30 
31 
48 ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd,
49  int events, ucs_async_event_cb_t cb,
50  void *arg, ucs_async_context_t *async);
51 
52 
68 ucs_status_t ucs_async_add_timer(ucs_async_mode_t mode, ucs_time_t interval,
69  ucs_async_event_cb_t cb, void *arg,
70  ucs_async_context_t *async, int *timer_id_p);
71 
72 
85 ucs_status_t ucs_async_remove_handler(int id, int sync);
86 
87 
98 ucs_status_t ucs_async_modify_handler(int fd, int events);
99 
100 
113 ucs_status_t ucs_async_context_create(ucs_async_mode_t mode,
114  ucs_async_context_t **async_p);
115 
116 
126 void ucs_async_context_destroy(ucs_async_context_t *async);
127 
128 
136 void ucs_async_poll(ucs_async_context_t *async);
137 
138 
139 void __ucs_async_poll_missed(ucs_async_context_t *async);
140 
141 END_C_DECLS
142 
143 #endif
void ucs_async_poll(ucs_async_context_t *async)
ucs_status_t ucs_async_context_create(ucs_async_mode_t mode, ucs_async_context_t **async_p)
Create an asynchronous execution context.
ucs_status_t
Status codes.
Definition: status.h:45
ucs_status_t ucs_async_add_timer(ucs_async_mode_t mode, ucs_time_t interval, ucs_async_event_cb_t cb, void *arg, ucs_async_context_t *async, int *timer_id_p)
ucs_status_t ucs_async_remove_handler(int id, int sync)
void ucs_async_context_destroy(ucs_async_context_t *async)
Destroy the asynchronous execution context.
ucs_status_t ucs_async_modify_handler(int fd, int events)
unsigned long ucs_time_t
Definition: time_def.h:23
ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd, int events, ucs_async_event_cb_t cb, void *arg, ucs_async_context_t *async)
void(* ucs_async_event_cb_t)(int id, void *arg)
Definition: async_fwd.h:29