summaryrefslogtreecommitdiff
path: root/gthread/gthread-win32.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-01-08 05:13:15 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-01-08 05:13:15 +0000
commit541462ab1e942ea02dd7d2e6dbcf0d02ad2c88de (patch)
tree1dd9e0b75d89e5fbf2de609bb335d85cc9d04ab7 /gthread/gthread-win32.c
parent8a688f12f05a0a5e70570a6af6efdc24f52cb53f (diff)
downloadglib-541462ab1e942ea02dd7d2e6dbcf0d02ad2c88de.tar.gz
Don't link glib against libpthread. (#393812)
2007-01-07 Matthias Clasen <mclasen@redhat.com> Don't link glib against libpthread. (#393812) * configure.in: Link gthread against librt, not glib itself. * glib/gthread.h: * glib/gthread.c: Add a new thread function, gettime. * glib/gtimer.c: Use gettime instead of directly working with the various system interfaces. * gthread/gthread-impl.c: * gthread/gthread-posix.c: * gthread/gthread-win32.c: Implement gettime. svn path=/trunk/; revision=5227
Diffstat (limited to 'gthread/gthread-win32.c')
-rw-r--r--gthread/gthread-win32.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gthread/gthread-win32.c b/gthread/gthread-win32.c
index e6896e86d..23c7bfd4d 100644
--- a/gthread/gthread-win32.c
+++ b/gthread/gthread-win32.c
@@ -545,6 +545,16 @@ g_thread_join_win32_impl (gpointer thread)
g_free (target);
}
+static guint64
+g_gettime_win32_impl (void)
+{
+ guint64 v;
+
+ GetSystemTimeAsFileTime ((FILETIME *)&v);
+
+ return v;
+}
+
static GThreadFunctions g_thread_functions_for_glib_use_default =
{
g_mutex_new_win32_impl, /* mutex */
@@ -567,7 +577,8 @@ static GThreadFunctions g_thread_functions_for_glib_use_default =
g_thread_exit_win32_impl,
g_thread_set_priority_win32_impl,
g_thread_self_win32_impl,
- NULL /* no equal function necessary */
+ NULL, /* no equal function necessary */
+ g_gettime_win32_impl
};
#define HAVE_G_THREAD_IMPL_INIT