gsource: Add support for file descriptors on UNIX
authorRyan Lortie <desrt@desrt.ca>
Mon, 14 Jan 2013 21:53:06 +0000 (16:53 -0500)
committerRyan Lortie <desrt@desrt.ca>
Tue, 15 Jan 2013 19:08:02 +0000 (14:08 -0500)
commitcbf68cb22d9f17721654283e97c2320025f03bc7
tree1de5409d61909f0efc98b489f5eb2355c62b06e2
parentdb7d5306cce36ace71e6f7765a7669fc335747e8
gsource: Add support for file descriptors on UNIX

Adding file descriptors to a GSource provides similar functionality to
the old g_source_add_poll() API with two main differences.

First: the list of handles is managed internally and therefore users are
prevented from randomly modifying the ->events field.  This prepares us
for an epoll future where changing the event mask is a syscall.

Second: keeping the list internally allows us to check the ->revents for
events for ourselves, allowing the source to skip implementing
check/prepare.  This also prepares us for the future by allowing an
implementation that doesn't need to iterate over all of the sources
every time.

https://bugzilla.gnome.org/show_bug.cgi?id=686853
docs/reference/glib/glib-sections.txt
glib/glib.symbols
glib/gmain.c
glib/gmain.h