From: Bart Van Assche Date: Mon, 13 Apr 2009 08:05:18 +0000 (+0000) Subject: Make sure that DRD does not complain about mutexes being held too long on systems... X-Git-Tag: svn/VALGRIND_3_5_0~823 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32df44aaa2e3f77eb9abd056b5ddce6a349acfb5;p=thirdparty%2Fvalgrind.git Make sure that DRD does not complain about mutexes being held too long on systems where the clock can go backward. Apparently this happens frequently when Linux is running inside a virtual machine. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9521 --- diff --git a/drd/drd_mutex.c b/drd/drd_mutex.c index 98de75e76f..14977f61cb 100644 --- a/drd/drd_mutex.c +++ b/drd/drd_mutex.c @@ -405,7 +405,7 @@ void DRD_(mutex_unlock)(const Addr mutex, MutexT mutex_type) { if (s_mutex_lock_threshold_ms > 0) { - ULong held = VG_(read_millisecond_timer)() - p->acquiry_time_ms; + Long held = VG_(read_millisecond_timer)() - p->acquiry_time_ms; if (held > s_mutex_lock_threshold_ms) { HoldtimeErrInfo HEI diff --git a/drd/drd_rwlock.c b/drd/drd_rwlock.c index a2cfdaf1a0..82f28acb67 100644 --- a/drd/drd_rwlock.c +++ b/drd/drd_rwlock.c @@ -521,7 +521,7 @@ void DRD_(rwlock_pre_unlock)(const Addr rwlock) q->reader_nesting_count--; if (q->reader_nesting_count == 0 && DRD_(s_shared_threshold_ms) > 0) { - ULong held = VG_(read_millisecond_timer)() - p->acquiry_time_ms; + Long held = VG_(read_millisecond_timer)() - p->acquiry_time_ms; if (held > DRD_(s_shared_threshold_ms)) { HoldtimeErrInfo HEI @@ -539,7 +539,7 @@ void DRD_(rwlock_pre_unlock)(const Addr rwlock) q->writer_nesting_count--; if (q->writer_nesting_count == 0 && DRD_(s_exclusive_threshold_ms) > 0) { - ULong held = VG_(read_millisecond_timer)() - p->acquiry_time_ms; + Long held = VG_(read_millisecond_timer)() - p->acquiry_time_ms; if (held > DRD_(s_exclusive_threshold_ms)) { HoldtimeErrInfo HEI