Removed ANNOTATE_HAPPENS_DONE() again.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11085
This commit is contained in:
Bart Van Assche 2010-03-08 18:41:38 +00:00
parent fc54d10f02
commit ab4f4b241f
4 changed files with 4 additions and 27 deletions

View File

@ -112,11 +112,6 @@
*/
#define ANNOTATE_HAPPENS_AFTER(addr) DRDCL_(annotate_happens_after)(addr)
/**
* Tell DRD that no more happens-after annotations will follow.
*/
#define ANNOTATE_HAPPENS_DONE(addr) DRDCL_(annotate_happens_done)(addr)
/**
* Tell DRD that waiting on the condition variable at address cv has succeeded
* and a lock on the mutex at address mtx is now held. Since DRD always inserts
@ -356,9 +351,6 @@ enum {
VG_USERREQ__DRD_ANNOTATE_HAPPENS_AFTER
= VG_USERREQ_TOOL_BASE('H','G') + 256 + 34,
/* args: Addr. */
/* Tell DRD to insert a happens-done annotation. */
VG_USERREQ__DRD_ANNOTATE_HAPPENS_DONE,
/* args: Addr. */
};
@ -459,14 +451,6 @@ void DRDCL_(annotate_happens_after)(const void* const addr)
addr, 0, 0, 0, 0);
}
static __inline__
void DRDCL_(annotate_happens_done)(const void* const addr)
{
int res;
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_ANNOTATE_HAPPENS_DONE,
addr, 0, 0, 0, 0);
}
static __inline__
void DRDCL_(annotate_rwlock_create)(const void* const rwlock)
{

View File

@ -123,10 +123,6 @@ static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret)
DRD_(hb_happens_after)(drd_tid, arg[1]);
break;
case VG_USERREQ__DRD_ANNOTATE_HAPPENS_DONE:
DRD_(hb_happens_done)(drd_tid, arg[1]);
break;
case VG_USERREQ__DRD_ANNOTATE_RWLOCK_CREATE:
if (arg[1])
{

View File

@ -30,14 +30,14 @@ int main(int argc, char** argv)
pthread_cond_init((pthread_cond_t*)&i, NULL);
/* The sequence below is fine. */
ANNOTATE_HAPPENS_DONE(&i);
ANNOTATE_NEW_MEMORY(&i, sizeof(i));
ANNOTATE_HAPPENS_BEFORE(&i);
ANNOTATE_HAPPENS_AFTER(&i);
ANNOTATE_HAPPENS_DONE(&i);
ANNOTATE_NEW_MEMORY(&i, sizeof(i));
ANNOTATE_HAPPENS_BEFORE(&i);
ANNOTATE_HAPPENS_DONE(&i);
ANNOTATE_NEW_MEMORY(&i, sizeof(i));
/* happens-before after happens-after without intervening happens-done. */
/* happens-before after happens-after. */
ANNOTATE_HAPPENS_BEFORE(&i);
ANNOTATE_HAPPENS_AFTER(&i);
ANNOTATE_HAPPENS_BEFORE(&i);

View File

@ -240,10 +240,7 @@ private:
if (--(*m_count_ptr) == 0)
{
if (s_enable_annotations)
{
ANNOTATE_HAPPENS_AFTER(m_count_ptr);
ANNOTATE_HAPPENS_DONE(m_count_ptr);
}
delete m_ptr;
m_ptr = NULL;
delete m_count_ptr;