mirror of git://gcc.gnu.org/git/gcc.git
gthr-posix.h: On Tru64...
* gthr-posix.h: On Tru64, map __gthr_foo as a weak reference to __foo and not foo when _PTHREAD_USE_MANGLED_NAMES_ is defined. From-SVN: r111282
This commit is contained in:
parent
8f0d39a86b
commit
c2a8530e21
|
@ -1,3 +1,8 @@
|
||||||
|
2006-02-19 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* gthr-posix.h: On Tru64, map __gthr_foo as a weak reference to
|
||||||
|
__foo and not foo when _PTHREAD_USE_MANGLED_NAMES_ is defined.
|
||||||
|
|
||||||
2006-02-19 David Edelsohn <edelsohn@gnu.org>
|
2006-02-19 David Edelsohn <edelsohn@gnu.org>
|
||||||
|
|
||||||
* config/rs6000/xcoff.h (TARGET_ASM_OUTPUT_ANCHOR): Define.
|
* config/rs6000/xcoff.h (TARGET_ASM_OUTPUT_ANCHOR): Define.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Threads compatibility routines for libgcc2 and libobjc. */
|
/* Threads compatibility routines for libgcc2 and libobjc. */
|
||||||
/* Compile this one with gcc. */
|
/* Compile this one with gcc. */
|
||||||
/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
@ -59,33 +59,61 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
|
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
|
||||||
# define __gthrw(name) \
|
# define __gthrw2(name,name2) \
|
||||||
static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
|
static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name2)));
|
||||||
# define __gthrw_(name) __gthrw_ ## name
|
# define __gthrw_(name) __gthrw_ ## name
|
||||||
#else
|
#else
|
||||||
# define __gthrw(name)
|
# define __gthrw2(name,name2)
|
||||||
# define __gthrw_(name) name
|
# define __gthrw_(name) name
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Typically, __gthrw_foo is a weak refernce to symbol foo. */
|
||||||
|
#define __gthrw(name) __gthrw2(name,name)
|
||||||
|
|
||||||
|
/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
|
||||||
|
map a subset of the POSIX pthread API to mangled versions of their
|
||||||
|
names. */
|
||||||
|
#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
|
||||||
|
__gthrw2(pthread_once,__pthread_once)
|
||||||
|
__gthrw2(pthread_getspecific,__pthread_getspecific)
|
||||||
|
__gthrw2(pthread_setspecific,__pthread_setspecific)
|
||||||
|
__gthrw2(pthread_create,__pthread_create)
|
||||||
|
__gthrw2(pthread_cancel,__pthread_cancel)
|
||||||
|
__gthrw2(pthread_mutex_lock,__pthread_mutex_lock)
|
||||||
|
__gthrw2(pthread_mutex_trylock,__pthread_mutex_trylock)
|
||||||
|
__gthrw2(pthread_mutex_unlock,__pthread_mutex_unlock)
|
||||||
|
__gthrw2(pthread_mutex_init,__pthread_mutex_init)
|
||||||
|
#else
|
||||||
__gthrw(pthread_once)
|
__gthrw(pthread_once)
|
||||||
__gthrw(pthread_key_create)
|
|
||||||
__gthrw(pthread_key_delete)
|
|
||||||
__gthrw(pthread_getspecific)
|
__gthrw(pthread_getspecific)
|
||||||
__gthrw(pthread_setspecific)
|
__gthrw(pthread_setspecific)
|
||||||
__gthrw(pthread_create)
|
__gthrw(pthread_create)
|
||||||
__gthrw(pthread_cancel)
|
__gthrw(pthread_cancel)
|
||||||
|
|
||||||
__gthrw(pthread_mutex_lock)
|
__gthrw(pthread_mutex_lock)
|
||||||
__gthrw(pthread_mutex_trylock)
|
__gthrw(pthread_mutex_trylock)
|
||||||
__gthrw(pthread_mutex_unlock)
|
__gthrw(pthread_mutex_unlock)
|
||||||
|
__gthrw(pthread_mutex_init)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
__gthrw(pthread_key_create)
|
||||||
|
__gthrw(pthread_key_delete)
|
||||||
__gthrw(pthread_mutexattr_init)
|
__gthrw(pthread_mutexattr_init)
|
||||||
__gthrw(pthread_mutexattr_settype)
|
__gthrw(pthread_mutexattr_settype)
|
||||||
__gthrw(pthread_mutexattr_destroy)
|
__gthrw(pthread_mutexattr_destroy)
|
||||||
|
|
||||||
__gthrw(pthread_mutex_init)
|
|
||||||
|
|
||||||
#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
|
#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
|
||||||
/* Objective-C. */
|
/* Objective-C. */
|
||||||
|
#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
|
||||||
|
__gthrw2(pthread_cond_broadcast,__pthread_cond_broadcast)
|
||||||
|
__gthrw2(pthread_cond_destroy,__pthread_cond_destroy)
|
||||||
|
__gthrw2(pthread_cond_init,__pthread_cond_init)
|
||||||
|
__gthrw2(pthread_cond_signal,__pthread_cond_signal)
|
||||||
|
__gthrw2(pthread_cond_wait,__pthread_cond_wait)
|
||||||
|
__gthrw2(pthread_exit,__pthread_exit)
|
||||||
|
__gthrw2(pthread_mutex_destroy,__pthread_mutex_destroy)
|
||||||
|
__gthrw2(pthread_self,__pthread_self)
|
||||||
|
#else
|
||||||
__gthrw(pthread_cond_broadcast)
|
__gthrw(pthread_cond_broadcast)
|
||||||
__gthrw(pthread_cond_destroy)
|
__gthrw(pthread_cond_destroy)
|
||||||
__gthrw(pthread_cond_init)
|
__gthrw(pthread_cond_init)
|
||||||
|
@ -94,6 +122,7 @@ __gthrw(pthread_cond_wait)
|
||||||
__gthrw(pthread_exit)
|
__gthrw(pthread_exit)
|
||||||
__gthrw(pthread_mutex_destroy)
|
__gthrw(pthread_mutex_destroy)
|
||||||
__gthrw(pthread_self)
|
__gthrw(pthread_self)
|
||||||
|
#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
|
||||||
#ifdef _POSIX_PRIORITY_SCHEDULING
|
#ifdef _POSIX_PRIORITY_SCHEDULING
|
||||||
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
|
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||||
__gthrw(sched_get_priority_max)
|
__gthrw(sched_get_priority_max)
|
||||||
|
|
Loading…
Reference in New Issue