Delay allocation until after all g_return_val_if_fail ().

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 Jrgen Viksell
	<jorgen.viksell@telia.com>
This commit is contained in:
Sebastian Wilhelmi 2002-02-04 13:49:36 +00:00 committed by Sebastian Wilhelmi
parent cf67c99825
commit cb17f230b5
10 changed files with 93 additions and 3 deletions

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View 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> 2002-02-02 Manish Singh <yosh@gimp.org>
* glib/gmain.c * glib/gmain.c

View File

@ -318,7 +318,7 @@ g_static_rec_mutex_lock_full (GStaticRecMutex *mutex,
guint guint
g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex) g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex)
{ {
gint depth; guint depth;
g_return_val_if_fail (mutex, 0); g_return_val_if_fail (mutex, 0);
@ -549,12 +549,14 @@ g_thread_create_full (GThreadFunc func,
GThreadPriority priority, GThreadPriority priority,
GError **error) GError **error)
{ {
GRealThread* result = g_new (GRealThread, 1); GRealThread* result;
GError *local_error = NULL; GError *local_error = NULL;
g_return_val_if_fail (func, 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_LOW, NULL);
g_return_val_if_fail (priority <= G_THREAD_PRIORITY_URGENT, NULL); g_return_val_if_fail (priority <= G_THREAD_PRIORITY_URGENT, NULL);
result = g_new (GRealThread, 1);
result->thread.joinable = joinable; result->thread.joinable = joinable;
result->thread.priority = priority; result->thread.priority = priority;
result->thread.func = func; result->thread.func = func;

View File

@ -243,7 +243,7 @@ typedef struct _GStaticRecMutex GStaticRecMutex;
struct _GStaticRecMutex struct _GStaticRecMutex
{ {
GStaticMutex mutex; GStaticMutex mutex;
unsigned int depth; guint depth;
GSystemThread owner; GSystemThread owner;
}; };