summaryrefslogtreecommitdiffstats
path: root/include/poller.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/poller.h')
-rw-r--r--include/poller.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/poller.h b/include/poller.h
index dc98155..cda5b57 100644
--- a/include/poller.h
+++ b/include/poller.h
@@ -12,13 +12,25 @@
struct poller_struct {
void (*func)(struct poller_struct *poller);
-
+ int registered;
struct list_head list;
};
int poller_register(struct poller_struct *poller);
int poller_unregister(struct poller_struct *poller);
+struct poller_async;
+
+struct poller_async {
+ struct poller_struct poller;
+ void (*fn)(void *);
+ void *ctx;
+ uint64_t end;
+};
+
+int poller_call_async(struct poller_async *pa, uint64_t delay_ns,
+ void (*fn)(void *), void *ctx);
+int poller_async_cancel(struct poller_async *pa);
#ifdef CONFIG_POLLER
void poller_call(void);