11#include <ucs/datastruct/list.h>
12#include <ucs/sys/compiler_def.h>
13#include <ucs/type/status.h>
28#define UCS_CALLBACKQ_FAST_COUNT 7
29#define UCS_CALLBACKQ_ID_NULL (-1)
37typedef struct ucs_callbackq_priv ucs_callbackq_priv_t;
38typedef void * ucs_callbackq_key_t;
50typedef unsigned (*ucs_callback_t)(
void *arg);
88 ucs_callbackq_priv_t *
priv;
120int ucs_callbackq_add(
ucs_callbackq_t *cbq, ucs_callback_t cb,
void *arg);
150int ucs_callbackq_add_safe(
ucs_callbackq_t *cbq, ucs_callback_t cb,
void *arg);
181void ucs_callbackq_add_oneshot(
ucs_callbackq_t *cbq, ucs_callbackq_key_t key,
182 ucs_callback_t cb,
void *arg);
195void ucs_callbackq_remove_oneshot(
ucs_callbackq_t *cbq, ucs_callbackq_key_t key,
196 ucs_callbackq_predicate_t pred,
void *arg);
214 for (elem = cbq->
fast_elems; (cb = elem->
cb) != NULL; ++elem) {
215 count += cb(elem->
arg);
ucs_status_t
Status codes.
Definition status.h:45
ucs_callbackq_elem_t fast_elems[UCS_CALLBACKQ_FAST_COUNT+1]
Definition callbackq.h:82
ucs_callbackq_priv_t * priv
Definition callbackq.h:88
ucs_callback_t cb
Definition callbackq.h:69
void * arg
Definition callbackq.h:70
Definition callbackq.h:77
Definition callbackq.h:68