Delay allocation until after all g_return_val_if_fail ().
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>
Mon, 4 Feb 2002 13:49:36 +0000 (13:49 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Mon, 4 Feb 2002 13:49:36 +0000 (13:49 +0000)
2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* glib/gthread.c (g_thread_create_full): Delay allocation until
after all g_return_val_if_fail ().

* glib/gthread.h: Make depth member guint for cosmetic reasons.

* glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
be unsigned. All that spotted by Jörgen Viksell
<jorgen.viksell@telia.com>

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/gthread.c
glib/gthread.h

index 5e94f3a..2a5212a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 5e94f3a..2a5212a 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
+
+       * glib/gthread.c (g_thread_create_full): Delay allocation until
+       after all g_return_val_if_fail ().
+
+       * glib/gthread.h: Make depth member guint for cosmetic reasons.
+
+       * glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
+       be unsigned. All that spotted by Jörgen Viksell
+       <jorgen.viksell@telia.com>
+
 2002-02-02  Manish Singh  <yosh@gimp.org>
 
        * glib/gmain.c
index 1cd16fc..15cb97b 100644 (file)
@@ -318,7 +318,7 @@ g_static_rec_mutex_lock_full   (GStaticRecMutex *mutex,
 guint    
 g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex)
 {
-  gint depth;
+  guint depth;
 
   g_return_val_if_fail (mutex, 0);
 
@@ -549,12 +549,14 @@ g_thread_create_full (GThreadFunc                  func,
                      GThreadPriority    priority,
                      GError                **error)
 {
-  GRealThread* result = g_new (GRealThread, 1);
+  GRealThread* result;
   GError *local_error = NULL;
   g_return_val_if_fail (func, NULL);
   g_return_val_if_fail (priority >= G_THREAD_PRIORITY_LOW, NULL);
   g_return_val_if_fail (priority <= G_THREAD_PRIORITY_URGENT, NULL);
   
+  result = g_new (GRealThread, 1);
+
   result->thread.joinable = joinable;
   result->thread.priority = priority;
   result->thread.func = func;
index d4573a1..1ca5aa6 100644 (file)
@@ -243,7 +243,7 @@ typedef struct _GStaticRecMutex GStaticRecMutex;
 struct _GStaticRecMutex
 {
   GStaticMutex mutex;
-  unsigned int depth;
+  guint depth;
   GSystemThread owner;
 };