/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1998, 2004, 2008, 2009, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
to initialize __gthread_mutex_t to get a fast
non-recursive mutex.
__GTHREAD_MUTEX_INIT_FUNCTION
- some systems can't initialize a mutex without a
- function call. On such systems, define this to a
- function which looks like this:
+ to initialize __gthread_mutex_t to get a fast
+ non-recursive mutex.
+ Define this to a function which looks like this:
void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
- Don't define __GTHREAD_MUTEX_INIT in this case
+ Some systems can't initialize a mutex without a
+ function call. Don't define __GTHREAD_MUTEX_INIT in this case.
__GTHREAD_RECURSIVE_MUTEX_INIT
__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
as above, but for a recursive mutex.
int __gthread_setspecific (__gthread_key_t key, const void *ptr)
int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+ int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex);
int __gthread_mutex_lock (__gthread_mutex_t *mutex);
int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
int __gthread_cond_timedwait (__gthread_cond_t *cond,
__gthread_mutex_t *mutex,
const __gthread_time_t *abs_timeout);
- int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
- __gthread_recursive_mutex_t *mutex,
- const __gthread_time_t *abs_time)
*/
#if SUPPORTS_WEAK
+/* The pe-coff weak support isn't fully compatible to ELF's weak.
+ For static libraries it might would work, but as we need to deal
+ with shared versions too, we disable it for mingw-targets. */
+#ifdef __MINGW32__
+#undef GTHREAD_USE_WEAK
+#define GTHREAD_USE_WEAK 0
+#endif
+
#ifndef GTHREAD_USE_WEAK
#define GTHREAD_USE_WEAK 1
#endif