33typedef struct xtc_chan_oneshot xtc_chan_oneshot_t;
42int xtc_chan_oneshot_create(
xtc_res_t *res, xtc_chan_oneshot_t **out);
43void xtc_chan_oneshot_destroy(xtc_chan_oneshot_t *c);
50int xtc_chan_oneshot_send(xtc_chan_oneshot_t *c,
void *msg);
53int xtc_chan_oneshot_try_recv(xtc_chan_oneshot_t *c,
void **out);
60int xtc_chan_oneshot_set_waker(xtc_chan_oneshot_t *c,
const xtc_waker_t *w);
64typedef struct xtc_chan_mpsc xtc_chan_mpsc_t;
75int xtc_chan_mpsc_create(
xtc_res_t *res,
size_t capacity,
76 xtc_chan_mpsc_t **out);
77void xtc_chan_mpsc_destroy(xtc_chan_mpsc_t *c);
88int xtc_chan_mpsc_try_send(xtc_chan_mpsc_t *c,
void *msg);
91int xtc_chan_mpsc_try_recv(xtc_chan_mpsc_t *c,
void **out);
94int xtc_chan_mpsc_set_waker(xtc_chan_mpsc_t *c,
const xtc_waker_t *w);
100int xtc_chan_mpsc_close(xtc_chan_mpsc_t *c);
102size_t xtc_chan_mpsc_len(
const xtc_chan_mpsc_t *c);
106typedef struct xtc_chan_watch xtc_chan_watch_t;
114int xtc_chan_watch_create(
xtc_res_t *res, xtc_chan_watch_t **out);
115void xtc_chan_watch_destroy(xtc_chan_watch_t *c);
116int xtc_chan_watch_send(xtc_chan_watch_t *c,
void *value);
117int xtc_chan_watch_recv(xtc_chan_watch_t *c,
void **out);
121typedef struct xtc_chan_mpmc xtc_chan_mpmc_t;
137int xtc_chan_mpmc_create(
xtc_res_t *res,
size_t capacity,
138 xtc_chan_mpmc_t **out);
139void xtc_chan_mpmc_destroy(xtc_chan_mpmc_t *c);
140int xtc_chan_mpmc_try_send(xtc_chan_mpmc_t *c,
void *msg);
141int xtc_chan_mpmc_try_recv(xtc_chan_mpmc_t *c,
void **out);
142int xtc_chan_mpmc_close(xtc_chan_mpmc_t *c);
143size_t xtc_chan_mpmc_len(
const xtc_chan_mpmc_t *c);
147typedef struct xtc_chan_broadcast xtc_chan_broadcast_t;
148typedef struct xtc_chan_broadcast_recv xtc_chan_broadcast_recv_t;
168int xtc_chan_broadcast_create(
xtc_res_t *res,
size_t capacity,
169 xtc_chan_broadcast_t **out);
170void xtc_chan_broadcast_destroy(xtc_chan_broadcast_t *c);
171int xtc_chan_broadcast_send(xtc_chan_broadcast_t *c,
void *msg);
172int xtc_chan_broadcast_subscribe(xtc_chan_broadcast_t *c,
173 xtc_chan_broadcast_recv_t **out_recv);
174void xtc_chan_broadcast_unsubscribe(xtc_chan_broadcast_recv_t *r);
182int xtc_chan_broadcast_recv(xtc_chan_broadcast_recv_t *r,
183 void **out,
int *lagged);