projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bc18fc
)
uloop: export the cancelled flag
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 6 Feb 2011 15:13:58 +0000
(16:13 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 6 Feb 2011 15:13:58 +0000
(16:13 +0100)
uloop.c
patch
|
blob
|
history
uloop.h
patch
|
blob
|
history
diff --git
a/uloop.c
b/uloop.c
index
a8cb506
..
4be5f45
100644
(file)
--- a/
uloop.c
+++ b/
uloop.c
@@
-48,7
+48,7
@@
struct uloop_timeout *first_timeout;
static int poll_fd;
struct uloop_timeout *first_timeout;
static int poll_fd;
-
static bool cancel
;
+
bool uloop_cancelled = false
;
#ifdef USE_KQUEUE
#ifdef USE_KQUEUE
@@
-327,7
+327,7
@@
int uloop_timeout_cancel(struct uloop_timeout *timeout)
static void uloop_handle_sigint(int signo)
{
static void uloop_handle_sigint(int signo)
{
-
cancel
= true;
+
uloop_cancelled
= true;
}
static void uloop_setup_signals(void)
}
static void uloop_setup_signals(void)
@@
-370,7
+370,7
@@
static void uloop_process_timeouts(struct timeval *tv)
void uloop_end(void)
{
void uloop_end(void)
{
-
cancel
= true;
+
uloop_cancelled
= true;
}
void uloop_run(void)
}
void uloop_run(void)
@@
-378,7
+378,7
@@
void uloop_run(void)
struct timeval tv;
uloop_setup_signals();
struct timeval tv;
uloop_setup_signals();
- while(!
cancel
)
+ while(!
uloop_cancelled
)
{
gettimeofday(&tv, NULL);
uloop_process_timeouts(&tv);
{
gettimeofday(&tv, NULL);
uloop_process_timeouts(&tv);
diff --git
a/uloop.h
b/uloop.h
index
10a117f
..
2b02e18
100644
(file)
--- a/
uloop.h
+++ b/
uloop.h
@@
-62,6
+62,8
@@
struct uloop_timeout
bool pending;
};
bool pending;
};
+extern bool uloop_cancelled;
+
int uloop_fd_add(struct uloop_fd *sock, unsigned int flags);
int uloop_fd_delete(struct uloop_fd *sock);
int uloop_fd_add(struct uloop_fd *sock, unsigned int flags);
int uloop_fd_delete(struct uloop_fd *sock);