mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 18:54:04 +02:00
Update pthread_mutex_t size and initializer contents to match latest pthreads-Win32.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glibconfig.h.win32: Update the magic values for
|
||||||
|
pthread_mutex_t size and initializer bytes to match the
|
||||||
|
latest version of pthreads for Win32.
|
||||||
|
|
||||||
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
* gutils.c (g_get_any_init): cleaned up the errno mess for
|
||||||
|
@@ -87,18 +87,38 @@ typedef unsigned __int64 guint64;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define G_THREADS_ENABLED
|
#define G_THREADS_ENABLED
|
||||||
|
/*
|
||||||
|
* The following program can be used to determine the magic values below:
|
||||||
|
* #include <stdio.h>
|
||||||
|
* #include <pthread.h>
|
||||||
|
* main(int argc, char **argv)
|
||||||
|
* {
|
||||||
|
* int i;
|
||||||
|
* pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
* printf ("sizeof (pthread_mutex_t) = %d\n", sizeof (pthread_mutex_t));
|
||||||
|
* printf ("PTHREAD_MUTEX_INITIALIZER = ");
|
||||||
|
* for (i = 0; i < sizeof (pthread_mutex_t); i++)
|
||||||
|
* printf ("%u, ", (unsigned) ((char *) &m)[i]);
|
||||||
|
* printf ("\n");
|
||||||
|
* exit(0);
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
typedef struct _GStaticMutex GStaticMutex;
|
typedef struct _GStaticMutex GStaticMutex;
|
||||||
struct _GStaticMutex
|
struct _GStaticMutex
|
||||||
{
|
{
|
||||||
struct _GMutex *runtime_mutex;
|
struct _GMutex *runtime_mutex;
|
||||||
union {
|
union {
|
||||||
char pad[24];
|
/* The size of the pad array should be sizeof (pthread_mutext_t) */
|
||||||
|
/* This value corresponds to the 1999-01-24 version of pthreads-win32 */
|
||||||
|
char pad[36];
|
||||||
double dummy_double;
|
double dummy_double;
|
||||||
void *dummy_pointer;
|
void *dummy_pointer;
|
||||||
long dummy_long;
|
long dummy_long;
|
||||||
} aligned_pad_u;
|
} aligned_pad_u;
|
||||||
};
|
};
|
||||||
#define G_STATIC_MUTEX_INIT { NULL, { { 0, 0, 0, 0, 0 } } }
|
/* 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) \
|
#define g_static_mutex_get_mutex(mutex) \
|
||||||
(g_thread_use_default_impl ? ((GMutex*) &(mutex).aligned_pad_u) : \
|
(g_thread_use_default_impl ? ((GMutex*) &(mutex).aligned_pad_u) : \
|
||||||
g_static_mutex_get_mutex_impl (&(mutex).runtime_mutex))
|
g_static_mutex_get_mutex_impl (&(mutex).runtime_mutex))
|
||||||
|
Reference in New Issue
Block a user