Annotate all custom GIO GSource using g_source_set_name

Naming the sources allows easier debugging with e.g. SystemTap
probes.

https://bugzilla.gnome.org/show_bug.cgi?id=620536
This commit is contained in:
Colin Walters
2010-07-10 20:09:34 -04:00
committed by Matthias Clasen
parent 7568bb66f9
commit d2fe46b476
6 changed files with 6 additions and 0 deletions

View File

@@ -208,6 +208,7 @@ gboolean _ik_startup (void (*cb)(ik_event_t *event))
g_io_channel_set_flags (inotify_read_ioc, G_IO_FLAG_NONBLOCK, NULL);
source = g_source_new (&ik_source_funcs, sizeof (GSource));
g_source_set_name (source, "GIO Inotify");
g_source_add_poll (source, &ik_poll_fd);
g_source_set_callback (source, ik_read_callback, NULL, NULL);
g_source_attach (source, NULL);