From ab4b6454865f8a7faba3915faaab01b14a23d85c Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Fri, 18 Dec 1998 09:20:52 +0000 Subject: [PATCH] Changed the last pthread_cond_init to pthread_attr_init. 1998-12-18 Sebastian Wilhelmi * configure.in (have_threads): Changed the last pthread_cond_init to pthread_attr_init. 1998-12-18 Sebastian Wilhelmi * testgthread.c (new_thread): As a joinable thread seems to be the default on posix, leave the explicit setting out, as it causes problems on some older platforms. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ configure.in | 5 +---- gthread/ChangeLog | 6 ++++++ gthread/testgthread.c | 4 +++- 11 files changed, 50 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3b293496..4f3324df2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c3b293496..4f3324df2 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +1998-12-18 Sebastian Wilhelmi + + * configure.in (have_threads): Changed the last pthread_cond_init + to pthread_attr_init. + Fri Dec 18 00:03:17 1998 Tim Janik * glib.h: diff --git a/configure.in b/configure.in index d864b3e08..6dbf7bb4c 100644 --- a/configure.in +++ b/configure.in @@ -572,9 +572,6 @@ if test "x$want_threads" = xyes || test "x$want_threads" = xposix; then AC_CHECK_LIB(pthreads, pthread_attr_init, have_threads=posix) fi if test "x$have_threads" = xnone; then - # dont let us be fooled by a defined pthread_cond_init - # function in the standard c-lib, that doesn't have too mean, - # there is full thread support, it might be a weak symbol. AC_CHECK_FUNC(pthread_attr_init, have_threads=posix) fi fi @@ -609,7 +606,7 @@ case $have_threads in G_THREAD_LIBS="-lpthreads") fi if test "x$G_THREAD_LIBS" = xerror; then - AC_CHECK_FUNC(pthread_cond_init, G_THREAD_LIBS="") + AC_CHECK_FUNC(pthread_attr_init, G_THREAD_LIBS="") fi ;; solaris) diff --git a/gthread/ChangeLog b/gthread/ChangeLog index 08509b87a..0a20f089b 100644 --- a/gthread/ChangeLog +++ b/gthread/ChangeLog @@ -1,3 +1,9 @@ +1998-12-18 Sebastian Wilhelmi + + * testgthread.c (new_thread): As a joinable thread seems to be the + default on posix, leave the explicit setting out, as it causes + problems on some older platforms. + Wed Dec 16 22:21:33 CST 1998 Shawn T. Amundson * gthread-posix.c: use g_free in mutex_free (from Tim Janik) diff --git a/gthread/testgthread.c b/gthread/testgthread.c index f6445ac1c..b71116fe3 100644 --- a/gthread/testgthread.c +++ b/gthread/testgthread.c @@ -79,7 +79,9 @@ new_thread(GHookFunc func, gpointer data) pthread_t thread; pthread_attr_t pthread_attr; pthread_attr_init (&pthread_attr); - pthread_attr_setdetachstate (&pthread_attr, PTHREAD_CREATE_JOINABLE); + /* This is the default, it seems, so leave that out for now + pthread_attr_setdetachstate (&pthread_attr, PTHREAD_CREATE_JOINABLE); + */ pthread_create (&thread, &pthread_attr, (void *(*)(void *)) func, data); return GUINT_TO_POINTER (thread); }