summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>1999-02-15 08:26:00 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>1999-02-15 08:26:00 +0000
commit8168836cd2bad582d63d7d693634b08c03204a4b (patch)
tree1cd5d11755a508dd3eca808f4f72ea4c3193d118
parent3f5639a791744d606af3c959aac661fd03ac886b (diff)
downloadglib-8168836cd2bad582d63d7d693634b08c03204a4b.tar.gz
Changed signature of all g_static_mutex_* functions to take a pointer
1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h, glibconfig.h.win32, configure.in: Changed signature of all g_static_mutex_* functions to take a pointer rather than the struct itself. This is not an issue at the moment, because those funcs are really macros, but is it un'G'ish and might fall on our feet in the future. * gthread/testgthread.c (test_mutexes): Use new signature of g_static_mutex* functions.
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.pre-2-08
-rw-r--r--ChangeLog.pre-2-108
-rw-r--r--ChangeLog.pre-2-128
-rw-r--r--ChangeLog.pre-2-28
-rw-r--r--ChangeLog.pre-2-48
-rw-r--r--ChangeLog.pre-2-68
-rw-r--r--ChangeLog.pre-2-88
-rw-r--r--configure.in6
-rw-r--r--glib.h12
-rw-r--r--glib/glib.h12
-rw-r--r--glibconfig.h.win324
-rw-r--r--gthread/ChangeLog5
-rw-r--r--gthread/testgthread.c4
14 files changed, 88 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index bb0b04b1a..de18db526 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index bb0b04b1a..de18db526 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,11 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * glib.h, glibconfig.h.win32, configure.in: Changed signature of
+ all g_static_mutex_* functions to take a pointer rather than the
+ struct itself. This is not an issue at the moment, because those
+ funcs are really macros, but is it un'G'ish and might fall on our
+ feet in the future.
+
Mon Feb 15 07:45:54 1999 Tim Janik <timj@gtk.org>
* configure.in (--enable-debug): default to yes for development trees.
diff --git a/configure.in b/configure.in
index 428fb77d5..53ea07c2a 100644
--- a/configure.in
+++ b/configure.in
@@ -995,8 +995,8 @@ struct _GStaticMutex
};
#define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } }
#define g_static_mutex_get_mutex(mutex) \
- (g_thread_use_default_impl ? ((GMutex*) &(mutex).aligned_pad_u) : \
- g_static_mutex_get_mutex_impl (&(mutex).runtime_mutex))
+ (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
+ g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
_______EOF
else
cat >>$outfile <<_______EOF
@@ -1004,7 +1004,7 @@ $g_enable_threads_def G_THREADS_ENABLED
#define G_THREADS_IMPL_$g_threads_impl_def
typedef struct _GMutex* GStaticMutex;
#define G_STATIC_MUTEX_INIT NULL
-#define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (&(mutex)))
+#define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
_______EOF
fi
diff --git a/glib.h b/glib.h
index 1f917b762..78ea3e65a 100644
--- a/glib.h
+++ b/glib.h
@@ -2741,25 +2741,25 @@ extern void glib_dummy_decl (void);
"file %s: line %d (%s): locking: %s ", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
#name); \
- g_static_mutex_lock (G_LOCK_NAME (name)); \
+ g_static_mutex_lock (&G_LOCK_NAME (name)); \
}G_STMT_END
# define G_UNLOCK(name) G_STMT_START{ \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"file %s: line %d (%s): unlocking: %s ", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
#name); \
- g_static_mutex_unlock (G_LOCK_NAME (name)); \
+ g_static_mutex_unlock (&G_LOCK_NAME (name)); \
}G_STMT_END
# define G_TRYLOCK(name) G_STMT_START{ \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"file %s: line %d (%s): try locking: %s ", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
#name); \
- }G_STMT_END, g_static_mutex_trylock (G_LOCK_NAME (name))
+ }G_STMT_END, g_static_mutex_trylock (&G_LOCK_NAME (name))
# else /* !G_DEBUG_LOCKS */
-# define G_LOCK(name) g_static_mutex_lock (G_LOCK_NAME (name))
-# define G_UNLOCK(name) g_static_mutex_unlock (G_LOCK_NAME (name))
-# define G_TRYLOCK(name) g_static_mutex_trylock (G_LOCK_NAME (name))
+# define G_LOCK(name) g_static_mutex_lock (&G_LOCK_NAME (name))
+# define G_UNLOCK(name) g_static_mutex_unlock (&G_LOCK_NAME (name))
+# define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name))
# endif /* !G_DEBUG_LOCKS */
#else /* !G_THREADS_ENABLED */
# define G_LOCK_DEFINE_STATIC(name) extern void glib_dummy_decl (void)
diff --git a/glib/glib.h b/glib/glib.h
index 1f917b762..78ea3e65a 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -2741,25 +2741,25 @@ extern void glib_dummy_decl (void);
"file %s: line %d (%s): locking: %s ", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
#name); \
- g_static_mutex_lock (G_LOCK_NAME (name)); \
+ g_static_mutex_lock (&G_LOCK_NAME (name)); \
}G_STMT_END
# define G_UNLOCK(name) G_STMT_START{ \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"file %s: line %d (%s): unlocking: %s ", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
#name); \
- g_static_mutex_unlock (G_LOCK_NAME (name)); \
+ g_static_mutex_unlock (&G_LOCK_NAME (name)); \
}G_STMT_END
# define G_TRYLOCK(name) G_STMT_START{ \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"file %s: line %d (%s): try locking: %s ", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
#name); \
- }G_STMT_END, g_static_mutex_trylock (G_LOCK_NAME (name))
+ }G_STMT_END, g_static_mutex_trylock (&G_LOCK_NAME (name))
# else /* !G_DEBUG_LOCKS */
-# define G_LOCK(name) g_static_mutex_lock (G_LOCK_NAME (name))
-# define G_UNLOCK(name) g_static_mutex_unlock (G_LOCK_NAME (name))
-# define G_TRYLOCK(name) g_static_mutex_trylock (G_LOCK_NAME (name))
+# define G_LOCK(name) g_static_mutex_lock (&G_LOCK_NAME (name))
+# define G_UNLOCK(name) g_static_mutex_unlock (&G_LOCK_NAME (name))
+# define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name))
# endif /* !G_DEBUG_LOCKS */
#else /* !G_THREADS_ENABLED */
# define G_LOCK_DEFINE_STATIC(name) extern void glib_dummy_decl (void)
diff --git a/glibconfig.h.win32 b/glibconfig.h.win32
index 05ff5f04e..83ea125a1 100644
--- a/glibconfig.h.win32
+++ b/glibconfig.h.win32
@@ -120,8 +120,8 @@ struct _GStaticMutex
/* This should be NULL followed by the bytes in PTHREAD_MUTEX_INITIALIZER */
#define G_STATIC_MUTEX_INIT { NULL, { { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } }
#define g_static_mutex_get_mutex(mutex) \
- (g_thread_use_default_impl ? ((GMutex*) &(mutex).aligned_pad_u) : \
- g_static_mutex_get_mutex_impl (&(mutex).runtime_mutex))
+ (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
+ g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
#define G_BYTE_ORDER G_LITTLE_ENDIAN
diff --git a/gthread/ChangeLog b/gthread/ChangeLog
index 414426681..953ed86c5 100644
--- a/gthread/ChangeLog
+++ b/gthread/ChangeLog
@@ -1,3 +1,8 @@
+1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * testgthread.c (test_mutexes): Use new signature of
+ g_static_mutex* functions.
+
1999-02-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread-posix.c (g_private_get_posix_impl): Use the
diff --git a/gthread/testgthread.c b/gthread/testgthread.c
index 493a47e9b..72874ccbc 100644
--- a/gthread/testgthread.c
+++ b/gthread/testgthread.c
@@ -26,8 +26,8 @@ test_mutexes (void)
g_mutex_lock (mutex);
g_mutex_unlock (mutex);
- g_static_mutex_lock (static_mutex);
- g_static_mutex_unlock (static_mutex);
+ g_static_mutex_lock (&static_mutex);
+ g_static_mutex_unlock (&static_mutex);
g_cond_signal (cond);
g_cond_broadcast (cond);