DRD updates (Bart Van Assche):
- Updated copyright statement: replaced 2006-2007 by 2006-2008.
- Added copyright statement in the files where it was missing
(drd_track.h and drd_clientreq.c)
- Eliminated dependencies on core header files -- there are no more
#include "pub_core....h" directives in the exp-drd source code.
- Added semaphore support.
- Added barrier support.
- Added pthread_mutex_timedlock() support.
- Stack depth of stack traces printed by exp-drd can now be set via
--num-callers=...
- Added command-line option --trace-barrier=[yes|no].
- Added regression test for pthread_barrier() (matinv, a program that
performs matrix inversion).
- Added regression test sem_as_mutex, which tests whether race
detection works correctly when a semaphore is used to ensure mutual
exclusion of critical sections.
- Some of helgrind's regression tests are now used to test both
helgrind and exp-drd: tc17_sembar and tc18_semabuse.
- Cleaned up bitmap implementation code now that the const keyword has
been added to the declarations of the OSet functions.
- Cleaned up exp-drd/Makefile.am
- Updated exp-drd/TODO.txt
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7346 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-drd/drd_bitmap.h b/exp-drd/drd_bitmap.h
index 248a5d2..d70252f 100644
--- a/exp-drd/drd_bitmap.h
+++ b/exp-drd/drd_bitmap.h
@@ -1,7 +1,7 @@
/*
This file is part of drd, a data race detector.
- Copyright (C) 2006-2007 Bart Van Assche
+ Copyright (C) 2006-2008 Bart Van Assche
bart.vanassche@gmail.com
This program is free software; you can redistribute it and/or
@@ -75,13 +75,6 @@
#define UWORD_HIGHEST_ADDRESS(a) ((a) | (BITS_PER_UWORD - 1))
-// Local functions.
-
-// Similar to const_cast<> in C++.
-static __inline__ OSet* const_to_non_const_oset(const OSet* os)
-{ return (OSet*)os; }
-
-
// Local constants.
static ULong s_bitmap2_creation_count;
@@ -134,7 +127,7 @@
struct bitmap2* bm_lookup(const struct bitmap* const bm, const Addr a)
{
const UWord a1 = a >> ADDR0_BITS;
- return VG_(OSetGen_Lookup)(const_to_non_const_oset(bm->oset), (void*)&a1);
+ return VG_(OSetGen_Lookup)(bm->oset, &a1);
}
static __inline__
@@ -155,7 +148,7 @@
struct bitmap2* bm2_lookup_or_insert(const struct bitmap* const bm,
const UWord a1)
{
- struct bitmap2* p2 = VG_(OSetGen_Lookup)(const_to_non_const_oset(bm->oset), (void*)&a1);
+ struct bitmap2* p2 = VG_(OSetGen_Lookup)(bm->oset, &a1);
if (p2 == 0)
{
p2 = bm2_insert(bm, a1);