Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-06-01 12:24:37 +0300
committerFelix Fietkau <nbd@nbd.name>2017-06-01 12:24:44 +0300
commit368fd2645878edadc72c60948d1f19c6769751d6 (patch)
treeadae81a2dfe43e5d47f81715d150d0a0329c9f40 /uloop.h
parentfa9937cc4f8e60ddfc2dd9b5820eac49bef3de6e (diff)
uloop: allow specifying a timeout for uloop_run()
This can be useful for cleanup with pending timers, or for hooking into existing code that does not use uloop Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'uloop.h')
-rw-r--r--uloop.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/uloop.h b/uloop.h
index 5ab9a5f..36084f5 100644
--- a/uloop.h
+++ b/uloop.h
@@ -105,7 +105,11 @@ static inline void uloop_end(void)
}
int uloop_init(void);
-int uloop_run(void);
+int uloop_run_timeout(int timeout);
+static inline int uloop_run(void)
+{
+ return uloop_run_timeout(-1);
+}
void uloop_done(void);
#endif