UCX 1.17
Unified Communication X
Loading...
Searching...
No Matches
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#include <ucs/sys/event_set.h>
14
15BEGIN_C_DECLS
16
20#define UCS_ASYNC_PTHREAD_ID_NULL ((pthread_t)-1)
21
22
23typedef struct ucs_async_context ucs_async_context_t;
24
25
35typedef void (*ucs_async_event_cb_t)(int id, ucs_event_set_types_t events,
36 void *arg);
37
38
55ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd,
56 ucs_event_set_types_t events,
57 ucs_async_event_cb_t cb, void *arg,
58 ucs_async_context_t *async);
59
60
76ucs_status_t ucs_async_add_timer(ucs_async_mode_t mode, ucs_time_t interval,
77 ucs_async_event_cb_t cb, void *arg,
78 ucs_async_context_t *async, int *timer_id_p);
79
80
95
96
107ucs_status_t ucs_async_modify_handler(int fd, ucs_event_set_types_t events);
108
109
124 ucs_async_context_t **async_p);
125
126
136void ucs_async_context_destroy(ucs_async_context_t *async);
137
138
146void ucs_async_poll(ucs_async_context_t *async);
147
148
149void __ucs_async_poll_missed(ucs_async_context_t *async);
150
151END_C_DECLS
152
153#endif
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)
void ucs_async_poll(ucs_async_context_t *async)
ucs_status_t ucs_async_modify_handler(int fd, ucs_event_set_types_t events)
ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd, ucs_event_set_types_t events, ucs_async_event_cb_t cb, void *arg, ucs_async_context_t *async)
void(* ucs_async_event_cb_t)(int id, ucs_event_set_types_t events, void *arg)
Definition async_fwd.h:35
void ucs_async_context_destroy(ucs_async_context_t *async)
Destroy the asynchronous execution context.
unsigned long ucs_time_t
Definition time_def.h:23
ucs_status_t ucs_async_remove_handler(int id, int sync)
ucs_status_t
Status codes.
Definition status.h:45
ucs_status_t ucs_async_context_create(ucs_async_mode_t mode, ucs_async_context_t **async_p)
Create an asynchronous execution context.