|
From: Paul F. <pa...@so...> - 2021-12-04 11:37:14
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e74872ded82025ef1a64d976f555174f5d6525a5 commit e74872ded82025ef1a64d976f555174f5d6525a5 Author: Paul Floyd <pj...@wa...> Date: Sat Dec 4 12:34:18 2021 +0100 Fix compiler warnings on non-Linux platforms. The new clock pthread APIs are not yet implemented on other platforms. So make them Linux-only for the moment. The DRD macros that instantiate the wrappers apply to all OSes so there is no compiler warning there. Diff: --- helgrind/hg_intercepts.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index c9b3f85ef3..7260c89aa0 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -1110,6 +1110,7 @@ PTH_FUNC(int, pthreadZumutexZureltimedlock, // pthread_mutex_reltimedlock } #endif +#if defined(VGP_linux) //----------------------------------------------------------- // glibc: pthread_mutex_clocklock // @@ -1157,6 +1158,7 @@ PTH_FUNC(int, pthreadZumutexZuclocklock, // pthread_mutex_clocklock void *timeout) { return mutex_clocklock_WRK(mutex, clockid, timeout); } +#endif //----------------------------------------------------------- // glibc: pthread_mutex_unlock @@ -1456,6 +1458,7 @@ static int pthread_cond_timedwait_WRK(pthread_cond_t* cond, # error "Unsupported OS" #endif +#if defined(VGO_linux) //----------------------------------------------------------- // glibc: pthread_cond_clockwait // @@ -1529,7 +1532,6 @@ static int pthread_cond_clockwait_WRK(pthread_cond_t* cond, return ret; } -#if defined(VGO_linux) PTH_FUNC(int, pthreadZucondZuclockwait, // pthread_cond_clockwait pthread_cond_t* cond, pthread_mutex_t* mutex, clockid_t clockid, @@ -2732,6 +2734,7 @@ PTH_FUNC(int, pthreadZurwlockZutimedrdlock, // pthread_rwlock_timedrdlock # error "Unsupported OS" #endif +#if defined(VGO_linux) //----------------------------------------------------------- // glibc: pthread_rwlock_clockrdlock // @@ -2765,7 +2768,7 @@ static int pthread_rwlock_clockrdlock_WRK(pthread_rwlock_t *rwlock, } return ret; } -#if defined(VGO_linux) + PTH_FUNC(int, pthreadZurwlockZuclockrdlock, // pthread_rwlock_clockrdlock pthread_rwlock_t *rwlock, clockid_t clockid, @@ -2834,7 +2837,7 @@ PTH_FUNC(int, pthreadZurwlockZutimedwrlock, // pthread_rwlock_timedwrlock # error "Unsupported OS" #endif - +#if defined(VGO_linux) //----------------------------------------------------------- // glibc: pthread_rwlock_clockwrlock // @@ -2868,7 +2871,7 @@ static int pthread_rwlock_clockwrlock_WRK(pthread_rwlock_t *rwlock, } return ret; } -#if defined(VGO_linux) + PTH_FUNC(int, pthreadZurwlockZuclockwrlock, // pthread_rwlock_clockwrlock pthread_rwlock_t *rwlock, clockid_t clockid, |