|
From: <sv...@va...> - 2014-03-18 17:54:08
|
Author: bart
Date: Tue Mar 18 17:53:56 2014
New Revision: 13877
Log:
drd: Fix pthread_rwlock_timed{rd,wr}lock intercepts (#332263)
From: Ivo Raisr <iv...@iv...>
Modified:
trunk/drd/drd_pthread_intercepts.c
Modified: trunk/drd/drd_pthread_intercepts.c
==============================================================================
--- trunk/drd/drd_pthread_intercepts.c (original)
+++ trunk/drd/drd_pthread_intercepts.c Tue Mar 18 17:53:56 2014
@@ -1162,14 +1162,15 @@
(pthread_rwlock_t* rwlock), (rwlock));
static __always_inline
-int pthread_rwlock_timedrdlock_intercept(pthread_rwlock_t* rwlock)
+int pthread_rwlock_timedrdlock_intercept(pthread_rwlock_t* rwlock,
+ const struct timespec *timeout)
{
int ret;
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_RWLOCK_RDLOCK,
rwlock, 0, 0, 0, 0);
- CALL_FN_W_W(ret, fn, rwlock);
+ CALL_FN_W_WW(ret, fn, rwlock, timeout);
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_RWLOCK_RDLOCK,
rwlock, ret == 0, 0, 0, 0);
return ret;
@@ -1177,17 +1178,19 @@
PTH_FUNCS(int,
pthreadZurwlockZutimedrdlock, pthread_rwlock_timedrdlock_intercept,
- (pthread_rwlock_t* rwlock), (rwlock));
+ (pthread_rwlock_t* rwlock, const struct timespec *timeout),
+ (rwlock, timeout));
static __always_inline
-int pthread_rwlock_timedwrlock_intercept(pthread_rwlock_t* rwlock)
+int pthread_rwlock_timedwrlock_intercept(pthread_rwlock_t* rwlock,
+ const struct timespec *timeout)
{
int ret;
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_RWLOCK_WRLOCK,
rwlock, 0, 0, 0, 0);
- CALL_FN_W_W(ret, fn, rwlock);
+ CALL_FN_W_WW(ret, fn, rwlock, timeout);
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_RWLOCK_WRLOCK,
rwlock, ret == 0, 0, 0, 0);
return ret;
@@ -1195,7 +1198,8 @@
PTH_FUNCS(int,
pthreadZurwlockZutimedwrlock, pthread_rwlock_timedwrlock_intercept,
- (pthread_rwlock_t* rwlock), (rwlock));
+ (pthread_rwlock_t* rwlock, const struct timespec *timeout),
+ (rwlock, timeout));
static __always_inline
int pthread_rwlock_tryrdlock_intercept(pthread_rwlock_t* rwlock)
|