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:
Diffstat (limited to 'uloop.h')
-rw-r--r--uloop.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/uloop.h b/uloop.h
index b3f268c..5edeb70 100644
--- a/uloop.h
+++ b/uloop.h
@@ -36,11 +36,13 @@ struct uloop_fd;
struct uloop_timeout;
struct uloop_process;
struct uloop_interval;
+struct uloop_signal;
typedef void (*uloop_fd_handler)(struct uloop_fd *u, unsigned int events);
typedef void (*uloop_timeout_handler)(struct uloop_timeout *t);
typedef void (*uloop_process_handler)(struct uloop_process *c, int ret);
typedef void (*uloop_interval_handler)(struct uloop_interval *t);
+typedef void (*uloop_signal_handler)(struct uloop_signal *s);
#define ULOOP_READ (1 << 0)
#define ULOOP_WRITE (1 << 1)
@@ -99,6 +101,16 @@ struct uloop_interval
} private;
};
+struct uloop_signal
+{
+ struct list_head list;
+ struct sigaction orig;
+ bool pending;
+
+ uloop_signal_handler cb;
+ int signo;
+};
+
extern bool uloop_cancelled;
extern bool uloop_handle_sigchld;
extern uloop_fd_handler uloop_fd_set_cb;
@@ -120,6 +132,9 @@ int uloop_interval_set(struct uloop_interval *timer, unsigned int msecs);
int uloop_interval_cancel(struct uloop_interval *timer);
int64_t uloop_interval_remaining(struct uloop_interval *timer);
+int uloop_signal_add(struct uloop_signal *s);
+int uloop_signal_delete(struct uloop_signal *s);
+
bool uloop_cancelling(void);
static inline void uloop_end(void)