DRD, refactoring: Introduce DRD_(trace_msg)()

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12120 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd_cond.c b/drd/drd_cond.c
index fd6df05..2e59b9f 100644
--- a/drd/drd_cond.c
+++ b/drd/drd_cond.c
@@ -148,12 +148,8 @@
    struct cond_info* p;
 
    if (DRD_(s_trace_cond))
-   {
-      VG_(message)(Vg_UserMsg,
-                   "[%d] cond_init       cond 0x%lx\n",
-                   DRD_(thread_get_running_tid)(),
-                   cond);
-   }
+      DRD_(trace_msg)("[%d] cond_init       cond 0x%lx\n",
+                      DRD_(thread_get_running_tid)(), cond);
 
    p = DRD_(cond_get)(cond);
 
@@ -176,12 +172,8 @@
    struct cond_info* p;
 
    if (DRD_(s_trace_cond))
-   {
-      VG_(message)(Vg_UserMsg,
-                   "[%d] cond_destroy    cond 0x%lx\n",
-                   DRD_(thread_get_running_tid)(),
-                   cond);
-   }
+      DRD_(trace_msg)("[%d] cond_destroy    cond 0x%lx\n",
+                      DRD_(thread_get_running_tid)(), cond);
 
    p = DRD_(cond_get)(cond);
    if (p == 0)
@@ -219,12 +211,8 @@
    struct mutex_info* q;
 
    if (DRD_(s_trace_cond))
-   {
-      VG_(message)(Vg_UserMsg,
-                   "[%d] cond_pre_wait   cond 0x%lx\n",
-                   DRD_(thread_get_running_tid)(),
-                   cond);
-   }
+      DRD_(trace_msg)("[%d] cond_pre_wait   cond 0x%lx\n",
+                      DRD_(thread_get_running_tid)(), cond);
 
    p = cond_get_or_allocate(cond);
    if (!p)
@@ -284,12 +272,8 @@
    struct cond_info* p;
 
    if (DRD_(s_trace_cond))
-   {
-      VG_(message)(Vg_UserMsg,
-                   "[%d] cond_post_wait  cond 0x%lx\n",
-                   DRD_(thread_get_running_tid)(),
-                   cond);
-   }
+      DRD_(trace_msg)("[%d] cond_post_wait  cond 0x%lx\n",
+                      DRD_(thread_get_running_tid)(), cond);
 
    p = DRD_(cond_get)(cond);
    if (!p)
@@ -369,12 +353,8 @@
 
    p = DRD_(cond_get)(cond);
    if (DRD_(s_trace_cond))
-   {
-      VG_(message)(Vg_UserMsg,
-                   "[%d] cond_signal     cond 0x%lx\n",
-                   DRD_(thread_get_running_tid)(),
-                   cond);
-   }
+      DRD_(trace_msg)("[%d] cond_signal     cond 0x%lx\n",
+                      DRD_(thread_get_running_tid)(), cond);
 
    tl_assert(DRD_(pthread_cond_initializer));
    if (!p && VG_(memcmp)((void*)cond, (void*)DRD_(pthread_cond_initializer),
@@ -396,12 +376,8 @@
    struct cond_info* p;
 
    if (DRD_(s_trace_cond))
-   {
-      VG_(message)(Vg_UserMsg,
-                   "[%d] cond_broadcast  cond 0x%lx\n",
-                   DRD_(thread_get_running_tid)(),
-                   cond);
-   }
+      DRD_(trace_msg)("[%d] cond_broadcast  cond 0x%lx\n",
+                      DRD_(thread_get_running_tid)(), cond);
 
    p = DRD_(cond_get)(cond);
    tl_assert(DRD_(pthread_cond_initializer));