diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-06-01 12:24:37 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-06-01 12:24:44 +0300 |
commit | 368fd2645878edadc72c60948d1f19c6769751d6 (patch) | |
tree | adae81a2dfe43e5d47f81715d150d0a0329c9f40 /uloop.h | |
parent | fa9937cc4f8e60ddfc2dd9b5820eac49bef3de6e (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.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |