mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
Allocate space for pollfd's _after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com> * gmain.c (g_main_poll): Allocate space for pollfd's _after_ adding poll wake-up-pipe record. * gmain.c (g_main_add_poll): Changed name of internal function g_main_add_poll_unlocked() back from the non-sensical g_main_add_unlocking_poll().
This commit is contained in:
parent
ce257b8137
commit
bb19315fbd
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
@ -1,3 +1,12 @@
|
||||
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.c (g_main_poll): Allocate space for pollfd's
|
||||
_after_ adding poll wake-up-pipe record.
|
||||
|
||||
* gmain.c (g_main_add_poll): Changed name
|
||||
of internal function g_main_add_poll_unlocked()
|
||||
back from the non-sensical g_main_add_unlocking_poll().
|
||||
|
||||
Sat Dec 19 06:25:55 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.m4: fixed a minor bug that would let configures bail out
|
||||
|
14
glib/gmain.c
14
glib/gmain.c
@ -83,7 +83,7 @@ struct _GPollRec
|
||||
static void g_main_poll (gint timeout,
|
||||
gboolean use_priority,
|
||||
gint priority);
|
||||
static void g_main_add_unlocking_poll (gint priority,
|
||||
static void g_main_add_poll_unlocked (gint priority,
|
||||
GPollFD *fd);
|
||||
|
||||
static gboolean g_timeout_prepare (gpointer source_data,
|
||||
@ -649,7 +649,7 @@ g_main_poll (gint timeout,
|
||||
gboolean use_priority,
|
||||
gint priority)
|
||||
{
|
||||
GPollFD *fd_array = g_new (GPollFD, n_poll_records);
|
||||
GPollFD *fd_array;
|
||||
GPollRec *pollrec;
|
||||
|
||||
gint i;
|
||||
@ -663,9 +663,11 @@ g_main_poll (gint timeout,
|
||||
|
||||
wake_up_rec.fd = wake_up_pipe[0];
|
||||
wake_up_rec.events = G_IO_IN;
|
||||
g_main_add_unlocking_poll (0, &wake_up_rec);
|
||||
g_main_add_poll_unlocked (0, &wake_up_rec);
|
||||
}
|
||||
|
||||
fd_array = g_new (GPollFD, n_poll_records);
|
||||
|
||||
pollrec = poll_records;
|
||||
i = 0;
|
||||
while (pollrec && (!use_priority || priority >= pollrec->priority))
|
||||
@ -710,14 +712,14 @@ g_main_add_poll (GPollFD *fd,
|
||||
gint priority)
|
||||
{
|
||||
G_LOCK (main_loop);
|
||||
g_main_add_unlocking_poll (priority, fd);
|
||||
g_main_add_poll_unlocked (priority, fd);
|
||||
G_UNLOCK (main_loop);
|
||||
}
|
||||
|
||||
/* HOLDS: main_loop_lock */
|
||||
static void
|
||||
g_main_add_unlocking_poll (gint priority,
|
||||
GPollFD *fd)
|
||||
g_main_add_poll_unlocked (gint priority,
|
||||
GPollFD *fd)
|
||||
{
|
||||
GPollRec *lastrec, *pollrec, *newrec;
|
||||
|
||||
|
14
gmain.c
14
gmain.c
@ -83,7 +83,7 @@ struct _GPollRec
|
||||
static void g_main_poll (gint timeout,
|
||||
gboolean use_priority,
|
||||
gint priority);
|
||||
static void g_main_add_unlocking_poll (gint priority,
|
||||
static void g_main_add_poll_unlocked (gint priority,
|
||||
GPollFD *fd);
|
||||
|
||||
static gboolean g_timeout_prepare (gpointer source_data,
|
||||
@ -649,7 +649,7 @@ g_main_poll (gint timeout,
|
||||
gboolean use_priority,
|
||||
gint priority)
|
||||
{
|
||||
GPollFD *fd_array = g_new (GPollFD, n_poll_records);
|
||||
GPollFD *fd_array;
|
||||
GPollRec *pollrec;
|
||||
|
||||
gint i;
|
||||
@ -663,9 +663,11 @@ g_main_poll (gint timeout,
|
||||
|
||||
wake_up_rec.fd = wake_up_pipe[0];
|
||||
wake_up_rec.events = G_IO_IN;
|
||||
g_main_add_unlocking_poll (0, &wake_up_rec);
|
||||
g_main_add_poll_unlocked (0, &wake_up_rec);
|
||||
}
|
||||
|
||||
fd_array = g_new (GPollFD, n_poll_records);
|
||||
|
||||
pollrec = poll_records;
|
||||
i = 0;
|
||||
while (pollrec && (!use_priority || priority >= pollrec->priority))
|
||||
@ -710,14 +712,14 @@ g_main_add_poll (GPollFD *fd,
|
||||
gint priority)
|
||||
{
|
||||
G_LOCK (main_loop);
|
||||
g_main_add_unlocking_poll (priority, fd);
|
||||
g_main_add_poll_unlocked (priority, fd);
|
||||
G_UNLOCK (main_loop);
|
||||
}
|
||||
|
||||
/* HOLDS: main_loop_lock */
|
||||
static void
|
||||
g_main_add_unlocking_poll (gint priority,
|
||||
GPollFD *fd)
|
||||
g_main_add_poll_unlocked (gint priority,
|
||||
GPollFD *fd)
|
||||
{
|
||||
GPollRec *lastrec, *pollrec, *newrec;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user