diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 1998-12-16 09:34:30 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 1998-12-16 09:34:30 +0000 |
commit | 2e57a3643891f41c238c5ee3793afcd8706a4060 (patch) | |
tree | 200572012ece4ca73a5f8ee48d03011ad52dcc5d /gmain.c | |
parent | b2e318ff3ecc50d72121a4e8561442a6d79a7a84 (diff) | |
download | glib-2e57a3643891f41c238c5ee3793afcd8706a4060.tar.gz |
Updated to reflect the existence of gthread.
1998-12-16 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* docs/glib-config.1: Updated to reflect the existence of gthread.
* gmain.c (g_main_poll_add_unlocking): Changed
g_main_poll_add_unlocked to g_main_poll_add_unlocking to match
semantic, (indeed, main_loop must be locked, when calling this
function). Removed the unlocking from the end of that function, as
that is not right. Made a 'HOLDS' comment above the function.
Diffstat (limited to 'gmain.c')
-rw-r--r-- | gmain.c | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -70,11 +70,11 @@ struct _GPollRec { /* Forward declarations */ -static void g_main_poll (gint timeout, - gboolean use_priority, - gint priority); -static void g_main_poll_add_unlocked (gint priority, - GPollFD *fd); +static void g_main_poll (gint timeout, + gboolean use_priority, + gint priority); +static void g_main_poll_add_unlocking (gint priority, + GPollFD *fd); static gboolean g_timeout_prepare (gpointer source_data, GTimeVal *current_time, @@ -588,7 +588,7 @@ g_main_poll (gint timeout, gboolean use_priority, gint priority) wake_up_rec.fd = wake_up_pipe[0]; wake_up_rec.events = G_IO_IN; - g_main_poll_add_unlocked (0, &wake_up_rec); + g_main_poll_add_unlocking (0, &wake_up_rec); } pollrec = poll_records; @@ -635,13 +635,14 @@ g_main_poll_add (gint priority, GPollFD *fd) { G_LOCK (main_loop); - g_main_poll_add_unlocked (priority, fd); + g_main_poll_add_unlocking (priority, fd); G_UNLOCK (main_loop); } +/* HOLDS: main_loop_lock */ static void -g_main_poll_add_unlocked (gint priority, - GPollFD *fd) +g_main_poll_add_unlocking (gint priority, + GPollFD *fd) { GPollRec *lastrec, *pollrec, *newrec; @@ -675,8 +676,6 @@ g_main_poll_add_unlocked (gint priority, newrec->next = pollrec; n_poll_records++; - - G_UNLOCK (main_loop); } void |