mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 02:17:51 +02:00
Renamed to glib/gthreadprivate.h and moved system thread identifier
2006-05-09 Sebastian Wilhelmi <wilhelmi@google.com> * glib/gthreadinit.h: Renamed to glib/gthreadprivate.h and moved system thread identifier comparision and assignment macros from glib/gthread.c to glib/gthreadprivate.h. * glib/Makefile.am, glib/gatomic.c, glib/gconvert.c, glib/gmain.c, glib/gmem.c, glib/gmessages.c, glib/grand.c, glib/gslice.c, glib/gthread.c, glib/gutils.c, gthread/gthread-impl.c: Use glib/gthreadprivate.h instead of glib/gthreadinit.h. * gthread/gthread-impl.c: Use GSystemThread instead of GThread for owner determination. This fixes #311043 and is mostly modeled after the patch from jylefort@FreeBSD.org.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
307391459d
commit
e4f8f3b95c
@@ -41,26 +41,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "glib.h"
|
||||
#include "gthreadinit.h"
|
||||
#include "gthreadprivate.h"
|
||||
#include "galias.h"
|
||||
|
||||
#if GLIB_SIZEOF_SYSTEM_THREAD == SIZEOF_VOID_P
|
||||
# define g_system_thread_equal_simple(thread1, thread2) \
|
||||
((thread1).dummy_pointer == (thread2).dummy_pointer)
|
||||
# define g_system_thread_assign(dest, src) \
|
||||
((dest).dummy_pointer = (src).dummy_pointer)
|
||||
#else /* GLIB_SIZEOF_SYSTEM_THREAD != SIZEOF_VOID_P */
|
||||
# define g_system_thread_equal_simple(thread1, thread2) \
|
||||
(memcmp (&(thread1), &(thread2), GLIB_SIZEOF_SYSTEM_THREAD) == 0)
|
||||
# define g_system_thread_assign(dest, src) \
|
||||
(memcpy (&(dest), &(src), GLIB_SIZEOF_SYSTEM_THREAD))
|
||||
#endif /* GLIB_SIZEOF_SYSTEM_THREAD == SIZEOF_VOID_P */
|
||||
|
||||
#define g_system_thread_equal(thread1, thread2) \
|
||||
(g_thread_functions_for_glib_use.thread_equal ? \
|
||||
g_thread_functions_for_glib_use.thread_equal (&(thread1), &(thread2)) :\
|
||||
g_system_thread_equal_simple((thread1), (thread2)))
|
||||
|
||||
GQuark
|
||||
g_thread_error_quark (void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user