mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-31 22:23:39 +02:00
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
This commit is contained in:
@@ -530,6 +530,10 @@ GSourceFunc
|
||||
g_source_set_callback_indirect
|
||||
g_source_set_ready_time
|
||||
g_source_get_ready_time
|
||||
g_source_add_unix_fd
|
||||
g_source_remove_unix_fd
|
||||
g_source_modify_unix_fd
|
||||
g_source_query_unix_fd
|
||||
g_source_add_poll
|
||||
g_source_remove_poll
|
||||
g_source_add_child_source
|
||||
|
Reference in New Issue
Block a user