mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Add missing implementation ofsource->priority, g_source_remove_poll.
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com> * gmain.c (g_source_remove_poll): Add missing implementation ofsource->priority, g_source_remove_poll. (Pointed out by Stefan Westerfeld)
This commit is contained in:
parent
f3ec41e8d2
commit
53be713583
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
@ -1,3 +1,8 @@
|
||||
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_source_remove_poll): Add missing implementation
|
||||
of g_source_remove_poll. (Pointed out by Stefan Westerfeld)
|
||||
|
||||
2001-02-21 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
|
||||
|
36
glib/gmain.c
36
glib/gmain.c
@ -896,12 +896,12 @@ g_source_get_context (GSource *source)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_main_source_add_poll:
|
||||
* g_source_add_poll:
|
||||
* @source:a #GSource
|
||||
* @fd: a #GPollFD structure holding information about a file
|
||||
* descriptor to watch.
|
||||
*
|
||||
* Add a file descriptor to the set of file descriptors polled * for
|
||||
* Add a file descriptor to the set of file descriptors polled for
|
||||
* this source. This is usually combined with g_source_new() to add an
|
||||
* event source. The event source's check function will typically test
|
||||
* the revents field in the #GPollFD struct and return %TRUE if events need
|
||||
@ -931,6 +931,38 @@ g_source_add_poll (GSource *source,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* g_source_remove_poll:
|
||||
* @source:a #GSource
|
||||
* @fd: a #GPollFD structure previously passed to g_source_poll.
|
||||
*
|
||||
* Remove a file descriptor from the set of file descriptors polled for
|
||||
* this source.
|
||||
**/
|
||||
void
|
||||
g_source_remove_poll (GSource *source,
|
||||
GPollFD *fd)
|
||||
{
|
||||
GMainContext *context;
|
||||
|
||||
g_return_if_fail (source != NULL);
|
||||
g_return_if_fail (fd != NULL);
|
||||
g_return_if_fail (!SOURCE_DESTROYED (source));
|
||||
|
||||
context = source->context;
|
||||
|
||||
if (context)
|
||||
LOCK_CONTEXT (context);
|
||||
|
||||
source->poll_fds = g_slist_remove (source->poll_fds, fd);
|
||||
|
||||
if (context)
|
||||
{
|
||||
g_main_context_remove_poll_unlocked (context, fd);
|
||||
UNLOCK_CONTEXT (context);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* g_source_set_callback_indirect:
|
||||
* @source: the source
|
||||
|
36
gmain.c
36
gmain.c
@ -896,12 +896,12 @@ g_source_get_context (GSource *source)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_main_source_add_poll:
|
||||
* g_source_add_poll:
|
||||
* @source:a #GSource
|
||||
* @fd: a #GPollFD structure holding information about a file
|
||||
* descriptor to watch.
|
||||
*
|
||||
* Add a file descriptor to the set of file descriptors polled * for
|
||||
* Add a file descriptor to the set of file descriptors polled for
|
||||
* this source. This is usually combined with g_source_new() to add an
|
||||
* event source. The event source's check function will typically test
|
||||
* the revents field in the #GPollFD struct and return %TRUE if events need
|
||||
@ -931,6 +931,38 @@ g_source_add_poll (GSource *source,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* g_source_remove_poll:
|
||||
* @source:a #GSource
|
||||
* @fd: a #GPollFD structure previously passed to g_source_poll.
|
||||
*
|
||||
* Remove a file descriptor from the set of file descriptors polled for
|
||||
* this source.
|
||||
**/
|
||||
void
|
||||
g_source_remove_poll (GSource *source,
|
||||
GPollFD *fd)
|
||||
{
|
||||
GMainContext *context;
|
||||
|
||||
g_return_if_fail (source != NULL);
|
||||
g_return_if_fail (fd != NULL);
|
||||
g_return_if_fail (!SOURCE_DESTROYED (source));
|
||||
|
||||
context = source->context;
|
||||
|
||||
if (context)
|
||||
LOCK_CONTEXT (context);
|
||||
|
||||
source->poll_fds = g_slist_remove (source->poll_fds, fd);
|
||||
|
||||
if (context)
|
||||
{
|
||||
g_main_context_remove_poll_unlocked (context, fd);
|
||||
UNLOCK_CONTEXT (context);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* g_source_set_callback_indirect:
|
||||
* @source: the source
|
||||
|
Loading…
Reference in New Issue
Block a user