mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
Renamed GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
1999-11-16 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * acconfig.h, config.h.win32.in, configure.in: Renamed GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect changed meaning. * configure.in: Cope with systems, that have a pthread_t type, that is not a pointer. Hint from Karl Nelson <kenelson@ece.ucdavis.edu>. Define GLIB_SIZEOF_SYSTEM_THREAD to 4 for Solaris. Cope with systems, that have no default mutex initialize, like obviously most DCE systems. * glib.h, gthread.c: Changed the prototype of thread_create and thread_self to return the system thread into provided memory instead of a return value. This is necessary, as HPUX has a pthread_t, that is bigger than the biggest integral type there. * gthread.c: system_thread is no longer a pointer, but an memory area of size GLIB_SIZEOF_SYSTEM_THREAD. Changed the zeroinitialization and the tests for zeroness accordingly.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
f0f028abd2
commit
760a7ceef2
16
configure.in
16
configure.in
@@ -736,7 +736,7 @@ case $have_threads in
|
||||
|
||||
AC_MSG_CHECKING(for pthread_join$IN)
|
||||
AC_TRY_LINK([#include <pthread.h>],
|
||||
[pthread_join(NULL,NULL)],
|
||||
[pthread_t t; pthread_join(t,NULL)],
|
||||
[AC_MSG_RESULT(yes)
|
||||
G_THREAD_LIBS="$add_thread_lib"
|
||||
break],
|
||||
@@ -876,12 +876,12 @@ if test x"$enable_threads" = xyes; then
|
||||
if test x"$have_threads" = xposix; then
|
||||
GLIB_SIZEOF([#include <pthread.h>],
|
||||
pthread_t,
|
||||
pthread_t)
|
||||
system_thread)
|
||||
# This is not AC_CHECK_FUNC to also work with function
|
||||
# name mangling in header files.
|
||||
AC_MSG_CHECKING(for pthread_attr_setstacksize)
|
||||
AC_TRY_LINK([#include <pthread.h>],
|
||||
[pthread_attr_setstacksize(NULL,0)],
|
||||
[pthread_attr_t t; pthread_attr_setstacksize(&t,0)],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE)],
|
||||
[AC_MSG_RESULT(no)])
|
||||
@@ -942,7 +942,12 @@ if test x"$enable_threads" = xyes; then
|
||||
posix_yield_func="$posix_yield_func()"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(POSIX_YIELD_FUNC,$posix_yield_func)
|
||||
else
|
||||
# for now, the only other implementation is solaris
|
||||
# -> there 4 bytes are enough
|
||||
AC_DEFINE_UNQUOTED(GLIB_SIZEOF_SYSTEM_THREAD, 4)
|
||||
fi
|
||||
|
||||
LIBS="$glib_save_LIBS"
|
||||
CFLAGS="$glib_save_CFLAGS"
|
||||
|
||||
@@ -978,6 +983,9 @@ GLIB_IF_VAR_EQ(mutex_has_default, yes,
|
||||
gmutex,
|
||||
$glib_cv_sizeof_gmutex,
|
||||
$mutex_default_init)
|
||||
if test x"$glib_cv_byte_contents_gmutex" = xno; then
|
||||
mutex_has_default=no
|
||||
fi
|
||||
if test x"$have_threads" = xposix; then
|
||||
GLIB_BYTE_CONTENTS([#define __USE_GNU
|
||||
#include <$mutex_header_file>],
|
||||
@@ -1182,7 +1190,7 @@ _______EOF
|
||||
# typedef GStaticMutex GStaticRecMutex to avoid silent
|
||||
# compilation, when a GStaticRecMutex is used where a
|
||||
# GStaticMutex should have been used and vice versa,
|
||||
# because that micht fail on other platforms.
|
||||
# because that might fail on other platforms.
|
||||
cat >>$outfile <<_______EOF
|
||||
typedef struct _GStaticRecMutex GStaticRecMutex;
|
||||
struct _GStaticRecMutex
|
||||
|
Reference in New Issue
Block a user