--- /dev/null
+/* Make the value of PTHREAD_COND_INITIALIZER available to DRD. */
+
+#include "drd_cond.h"
+#include <pthread.h>
+
+static pthread_cond_t pthread_cond_initializer = PTHREAD_COND_INITIALIZER;
+Addr DRD_(pthread_cond_initializer) = (Addr)&pthread_cond_initializer;
+int DRD_(pthread_cond_initializer_size) = sizeof(pthread_cond_initializer);
static void DRD_(init)(void) __attribute__((constructor));
static void DRD_(check_threading_library)(void);
static void DRD_(set_main_thread_state)(void);
-static void DRD_(set_pthread_cond_initializer)(void);
/* Function definitions. */
{
DRD_(check_threading_library)();
DRD_(set_main_thread_state)();
- DRD_(set_pthread_cond_initializer)();
}
/**
pthread_self(), 0, 0, 0, 0);
}
-/** Tell DRD which value PTHREAD_COND_INITIALIZER has. */
-static void DRD_(set_pthread_cond_initializer)(void)
-{
- int res;
-
- static pthread_cond_t pthread_cond_initializer = PTHREAD_COND_INITIALIZER;
-
- // Make sure that DRD knows about the main thread's POSIX thread ID.
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__SET_PTHREAD_COND_INITIALIZER,
- &pthread_cond_initializer,
- sizeof(pthread_cond_initializer),
- 0, 0, 0);
-}
-
-
/*
* Note: as of today there exist three different versions of pthread_create
* in Linux: