aboutsummaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c
index fba82b4..2593cdc 100644
--- a/src/common.c
+++ b/src/common.c
@@ -961,6 +961,15 @@ poller_timers_find (struct poller_timers *self,
return -1;
}
+static ssize_t
+poller_timers_find_by_data (struct poller_timers *self, void *data)
+{
+ for (size_t i = 0; i < self->len; i++)
+ if (self->info[i].user_data == data)
+ return i;
+ return -1;
+}
+
static void
poller_timers_add (struct poller_timers *self,
poller_timer_func dispatcher, void *data, int timeout_ms)