summaryrefslogtreecommitdiff
path: root/source4/gtk/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-01-05 09:35:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:50 -0500
commitb213b70c089046f426e1e3f2f733e42a02e2cbfe (patch)
treea7f76bc62aa974810e691ad1715cc5900bba09ed /source4/gtk/common
parent9698b2c2821986fdf2bb66dc4a52b2d50fbea151 (diff)
downloadsamba-b213b70c089046f426e1e3f2f733e42a02e2cbfe.tar.gz
samba-b213b70c089046f426e1e3f2f733e42a02e2cbfe.tar.bz2
samba-b213b70c089046f426e1e3f2f733e42a02e2cbfe.zip
r20539: - split the common timer related events code into events_timed.c
- make it easier to plug in a new events backend - add simpler 'select' and 'epoll' backends This is part of the effort to add good AIO support. The events_aio.c backend is done, but sometimes dies with a SEGV, which is why it isn't enabled yet. (This used to be commit 934f18283dbc7958944931a93a854526bcd54884)
Diffstat (limited to 'source4/gtk/common')
-rw-r--r--source4/gtk/common/gtk_events.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/gtk/common/gtk_events.c b/source4/gtk/common/gtk_events.c
index 67467b87a7..45e1031093 100644
--- a/source4/gtk/common/gtk_events.c
+++ b/source4/gtk/common/gtk_events.c
@@ -43,7 +43,7 @@ static int gtk_event_context_destructor(struct event_context *ev)
/*
create a gtk_event_context structure.
*/
-static int gtk_event_context_init(struct event_context *ev, void *private_data)
+static int gtk_event_context_init(struct event_context *ev)
{
talloc_set_destructor(ev, gtk_event_context_destructor);
return 0;
@@ -339,16 +339,13 @@ static const struct event_ops gtk_event_ops = {
.loop_wait = gtk_event_loop_wait,
};
-const struct event_ops *gtk_event_get_ops(void)
-{
- return &gtk_event_ops;
-}
-
int gtk_event_loop(void)
{
int ret;
- gtk_event_context_global = event_context_init_ops(NULL, &gtk_event_ops, NULL);
+ event_register_backend("gtk", &gtk_event_ops);
+
+ gtk_event_context_global = event_context_init_byname(NULL, "gtk");
if (!gtk_event_context_global) return -1;
ret = event_loop_wait(gtk_event_context_global);