Allocate space for pollfd's _after_ adding poll wake-up-pipe record.
authorOwen Taylor <otaylor@redhat.com>
Sat, 19 Dec 1998 22:11:49 +0000 (22:11 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 19 Dec 1998 22:11:49 +0000 (22:11 +0000)
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().

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmain.c
gmain.c

index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index c0482d42b3da280fb5ab3142748469f5d0ce06de..d5ee525b9928ef49e1775fafd42627926187bf71 100644 (file)
@@ -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
index 6821269f592b12cf9c83e6a1a8931ff8d9a62c57..3fcc873d80692b6a97210540f2ca7f2a7396cc14 100644 (file)
@@ -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;
 
diff --git a/gmain.c b/gmain.c
index 6821269f592b12cf9c83e6a1a8931ff8d9a62c57..3fcc873d80692b6a97210540f2ca7f2a7396cc14 100644 (file)
--- a/gmain.c
+++ b/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;