diff mbox

Fix gthr changes

Message ID alpine.LNX.2.00.1203131031450.18230@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener March 13, 2012, 9:33 a.m. UTC
This fixes the duplicate __GTHREAD_MUTEX_INIT_FUNCTION / 
__gthread_mutex_init_function present after my recent gthr change.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2012-03-13  Richard Guenther  <rguenther@suse.de>

	* gthr-posix.h: Remove duplicate __GTHREAD_MUTEX_INIT_FUNCTION
	and __gthread_mutex_init_function definitions.
diff mbox

Patch

Index: libgcc/gthr-posix.h
===================================================================
--- libgcc/gthr-posix.h	(revision 185232)
+++ libgcc/gthr-posix.h	(working copy)
@@ -77,7 +77,6 @@  typedef struct timespec __gthread_time_t
 
 #ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
 # undef __GTHREAD_MUTEX_INIT
-# define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
 #endif
 #ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
 # undef __GTHREAD_RECURSIVE_MUTEX_INIT
@@ -745,22 +744,12 @@  __gthread_setspecific (__gthread_key_t _
   return __gthrw_(pthread_setspecific) (__key, __ptr);
 }
 
-#ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
 static inline void
 __gthread_mutex_init_function (__gthread_mutex_t *__mutex)
 {
   if (__gthread_active_p ())
     __gthrw_(pthread_mutex_init) (__mutex, NULL);
 }
-#endif
-
-static inline int
-__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
-{
-  if (__gthread_active_p ())
-    return __gthrw_(pthread_mutex_init) (__mutex, NULL);
-  return 0;
-}
 
 static inline int
 __gthread_mutex_destroy (__gthread_mutex_t *__mutex)