projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libubox: allow reading out the pid of uloop process in lua
[project/libubox.git]
/
uloop.h
diff --git
a/uloop.h
b/uloop.h
index 39b9b582336efe7780ea6c36a6f24c77277c963f..2f1eb4c49e12896d11e64bb8e16c0fd8e76b0ef0 100644
(file)
--- a/
uloop.h
+++ b/
uloop.h
@@
-44,10
+44,17
@@
typedef void (*uloop_process_handler)(struct uloop_process *c, int ret);
#define ULOOP_WRITE (1 << 1)
#define ULOOP_EDGE_TRIGGER (1 << 2)
#define ULOOP_BLOCKING (1 << 3)
#define ULOOP_WRITE (1 << 1)
#define ULOOP_EDGE_TRIGGER (1 << 2)
#define ULOOP_BLOCKING (1 << 3)
+
+#define ULOOP_EVENT_MASK (ULOOP_READ | ULOOP_WRITE)
+
+/* internal flags */
+#define ULOOP_EVENT_BUFFERED (1 << 4)
#ifdef USE_KQUEUE
#ifdef USE_KQUEUE
-#define ULOOP_EDGE_DEFER (1 <<
4
)
+#define ULOOP_EDGE_DEFER (1 <<
5
)
#endif
#endif
+#define ULOOP_ERROR_CB (1 << 6)
+
struct uloop_fd
{
uloop_fd_handler cb;
struct uloop_fd
{
uloop_fd_handler cb;
@@
-96,7
+103,7
@@
static inline void uloop_end(void)
}
int uloop_init(void);
}
int uloop_init(void);
-
void
uloop_run(void);
+
int
uloop_run(void);
void uloop_done(void);
#endif
void uloop_done(void);
#endif