gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix rule that a symbolic constant...

2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix
	rule that a symbolic constant must be defined and >= 0 for the
	corresponding facility to be present at compile-time.
	* gthr-posix.c: Likewise.

From-SVN: r139739
This commit is contained in:
Paolo Carlini 2008-08-28 22:00:46 +00:00 committed by Paolo Carlini
parent d6d3e623f2
commit 1cd8b853ba
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
* gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix
rule that a symbolic constant must be defined and >= 0 for the
corresponding facility to be present at compile-time.
* gthr-posix.c: Likewise.
2008-08-28 Adam Nemet <anemet@caviumnetworks.com> 2008-08-28 Adam Nemet <anemet@caviumnetworks.com>
* config/mips/mips.h (ISA_HAS_DMUL3): New macro. * config/mips/mips.h (ISA_HAS_DMUL3): New macro.

View File

@ -112,12 +112,14 @@ pthread_mutex_trylock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED)
} }
#ifdef _POSIX_TIMEOUTS #ifdef _POSIX_TIMEOUTS
#if _POSIX_TIMEOUTS >= 0
int int
pthread_mutex_timedlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED, pthread_mutex_timedlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED,
const struct timespec *abs_timeout ATTRIBUTE_UNUSED) const struct timespec *abs_timeout ATTRIBUTE_UNUSED)
{ {
return 0; return 0;
} }
#endif
#endif /* _POSIX_TIMEOUTS */ #endif /* _POSIX_TIMEOUTS */
int int

View File

@ -104,7 +104,9 @@ __gthrw3(sched_yield)
__gthrw3(pthread_mutex_lock) __gthrw3(pthread_mutex_lock)
__gthrw3(pthread_mutex_trylock) __gthrw3(pthread_mutex_trylock)
#ifdef _POSIX_TIMEOUTS #ifdef _POSIX_TIMEOUTS
#if _POSIX_TIMEOUTS >= 0
__gthrw3(pthread_mutex_timedlock) __gthrw3(pthread_mutex_timedlock)
#endif
#endif /* _POSIX_TIMEOUTS */ #endif /* _POSIX_TIMEOUTS */
__gthrw3(pthread_mutex_unlock) __gthrw3(pthread_mutex_unlock)
__gthrw3(pthread_mutex_init) __gthrw3(pthread_mutex_init)
@ -131,7 +133,9 @@ __gthrw(sched_yield)
__gthrw(pthread_mutex_lock) __gthrw(pthread_mutex_lock)
__gthrw(pthread_mutex_trylock) __gthrw(pthread_mutex_trylock)
#ifdef _POSIX_TIMEOUTS #ifdef _POSIX_TIMEOUTS
#if _POSIX_TIMEOUTS >= 0
__gthrw(pthread_mutex_timedlock) __gthrw(pthread_mutex_timedlock)
#endif
#endif /* _POSIX_TIMEOUTS */ #endif /* _POSIX_TIMEOUTS */
__gthrw(pthread_mutex_unlock) __gthrw(pthread_mutex_unlock)
__gthrw(pthread_mutex_init) __gthrw(pthread_mutex_init)
@ -768,6 +772,7 @@ __gthread_mutex_trylock (__gthread_mutex_t *mutex)
} }
#ifdef _POSIX_TIMEOUTS #ifdef _POSIX_TIMEOUTS
#if _POSIX_TIMEOUTS >= 0
static inline int static inline int
__gthread_mutex_timedlock (__gthread_mutex_t *mutex, __gthread_mutex_timedlock (__gthread_mutex_t *mutex,
const __gthread_time_t *abs_timeout) const __gthread_time_t *abs_timeout)
@ -778,6 +783,7 @@ __gthread_mutex_timedlock (__gthread_mutex_t *mutex,
return 0; return 0;
} }
#endif #endif
#endif
static inline int static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex) __gthread_mutex_unlock (__gthread_mutex_t *mutex)
@ -823,6 +829,7 @@ __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
} }
#ifdef _POSIX_TIMEOUTS #ifdef _POSIX_TIMEOUTS
#if _POSIX_TIMEOUTS >= 0
static inline int static inline int
__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *mutex, __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *mutex,
const __gthread_time_t *abs_timeout) const __gthread_time_t *abs_timeout)
@ -830,6 +837,7 @@ __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *mutex,
return __gthread_mutex_timedlock (mutex, abs_timeout); return __gthread_mutex_timedlock (mutex, abs_timeout);
} }
#endif #endif
#endif
static inline int static inline int
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)