summaryrefslogtreecommitdiff
path: root/gthread/gthread-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'gthread/gthread-posix.c')
-rw-r--r--gthread/gthread-posix.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/gthread/gthread-posix.c b/gthread/gthread-posix.c
index 9188f843e..5fbcf2803 100644
--- a/gthread/gthread-posix.c
+++ b/gthread/gthread-posix.c
@@ -119,12 +119,7 @@ static gulong g_thread_min_stack_size = 0;
#define G_MUTEX_SIZE (sizeof (pthread_mutex_t))
-#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK)
-#define USE_CLOCK_GETTIME 1
-static gint posix_clock = 0;
-#endif
-
-#if defined(_SC_THREAD_STACK_MIN) || defined (HAVE_PRIORITIES) || defined (USE_CLOCK_GETTIME)
+#if defined(_SC_THREAD_STACK_MIN) || defined (HAVE_PRIORITIES)
#define HAVE_G_THREAD_IMPL_INIT
static void
g_thread_impl_init(void)
@@ -146,13 +141,6 @@ g_thread_impl_init(void)
g_thread_priority_map [priority]));
# endif
#endif /* HAVE_PRIORITIES */
-
-#ifdef USE_CLOCK_GETTIME
- if (sysconf (_SC_MONOTONIC_CLOCK) >= 0)
- posix_clock = CLOCK_MONOTONIC;
- else
- posix_clock = CLOCK_REALTIME;
-#endif
}
#endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */
@@ -426,21 +414,6 @@ g_thread_equal_posix_impl (gpointer thread1, gpointer thread2)
return (pthread_equal (*(pthread_t*)thread1, *(pthread_t*)thread2) != 0);
}
-#ifdef USE_CLOCK_GETTIME
-static guint64
-gettime (void)
-{
- struct timespec tv;
-
- clock_gettime (posix_clock, &tv);
-
- return (guint64) tv.tv_sec * G_NSEC_PER_SEC + tv.tv_nsec;
-}
-static guint64 (*g_thread_gettime_impl)(void) = gettime;
-#else
-static guint64 (*g_thread_gettime_impl)(void) = 0;
-#endif
-
static GThreadFunctions g_thread_functions_for_glib_use_default =
{
g_mutex_new_posix_impl,