From cb17f230b5d50f7e3315fc2bda5ebecf23acd6d4 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Mon, 4 Feb 2002 13:49:36 +0000 Subject: [PATCH] Delay allocation until after all g_return_val_if_fail (). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2002-02-04 Sebastian Wilhelmi * 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 --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-0 | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-12 | 11 +++++++++++ ChangeLog.pre-2-2 | 11 +++++++++++ ChangeLog.pre-2-4 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ glib/gthread.c | 6 ++++-- glib/gthread.h | 2 +- 10 files changed, 93 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e94f3a..2a5212a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5e94f3a..2a5212a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +2002-02-04 Sebastian Wilhelmi + + * 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 + + 2002-02-02 Manish Singh * glib/gmain.c diff --git a/glib/gthread.c b/glib/gthread.c index 1cd16fc..15cb97b 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -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; diff --git a/glib/gthread.h b/glib/gthread.h index d4573a1..1ca5aa6 100644 --- a/glib/gthread.h +++ b/glib/gthread.h @@ -243,7 +243,7 @@ typedef struct _GStaticRecMutex GStaticRecMutex; struct _GStaticRecMutex { GStaticMutex mutex; - unsigned int depth; + guint depth; GSystemThread owner; }; -- 2.7.4