Changes:
- Generalized the behavior of happens-before / happens-after annotations such
  that not only 1:1 but also n:m patterns are supported.
- Dropped support for invoking happens-before / happens-after annotations on
  POSIX condition variables (pthread_cond_t).
- Report the details about the offending synchronization object in generic
  errors.
- Converted a few tl_assert() statements into error messages.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11073 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd_clientobj.h b/drd/drd_clientobj.h
index 13941c5..66882d6 100644
--- a/drd/drd_clientobj.h
+++ b/drd/drd_clientobj.h
@@ -45,9 +45,10 @@
 typedef enum {
    ClientMutex     = 1,
    ClientCondvar   = 2,
-   ClientSemaphore = 3,
-   ClientBarrier   = 4,
-   ClientRwlock    = 5,
+   ClientHbvar     = 3,
+   ClientSemaphore = 4,
+   ClientBarrier   = 5,
+   ClientRwlock    = 6,
 } ObjType;
 
 struct any
@@ -83,7 +84,18 @@
    ExeContext* first_observed_at;
    int         waiter_count;
    Addr        mutex; // Client mutex specified in pthread_cond_wait() call, and
-   // null if no client threads are currently waiting on this cond.var.
+            // null if no client threads are currently waiting on this cond.var.
+};
+
+struct hb_info
+{
+   Addr        a1;
+   ObjType     type;
+   void        (*cleanup)(union drd_clientobj*);
+   void        (*delete_thread)(union drd_clientobj*, DrdThreadId);
+   ExeContext* first_observed_at;
+   OSet*       oset;  // Per-thread order annotation information.
+   Bool        done;  // Whether happens-done has already been invoked.
 };
 
 struct semaphore_info
@@ -135,6 +147,7 @@
    struct any            any;
    struct mutex_info     mutex;
    struct cond_info      cond;
+   struct hb_info        hb;
    struct semaphore_info semaphore;
    struct barrier_info   barrier;
    struct rwlock_info    rwlock;