|
From: <sv...@va...> - 2009-04-13 08:05:24
|
Author: bart
Date: 2009-04-13 09:05:18 +0100 (Mon, 13 Apr 2009)
New Revision: 9521
Log:
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.
Modified:
trunk/drd/drd_mutex.c
trunk/drd/drd_rwlock.c
Modified: trunk/drd/drd_mutex.c
===================================================================
--- trunk/drd/drd_mutex.c 2009-04-08 15:06:34 UTC (rev 9520)
+++ trunk/drd/drd_mutex.c 2009-04-13 08:05:18 UTC (rev 9521)
@@ -405,7 +405,7 @@
{
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
Modified: trunk/drd/drd_rwlock.c
===================================================================
--- trunk/drd/drd_rwlock.c 2009-04-08 15:06:34 UTC (rev 9520)
+++ trunk/drd/drd_rwlock.c 2009-04-13 08:05:18 UTC (rev 9521)
@@ -521,7 +521,7 @@
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 @@
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
|