summaryrefslogtreecommitdiff
path: root/lib/pthreadpool
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-12-23 09:44:49 +0100
committerStefan Metzmacher <metze@samba.org>2019-01-11 23:11:14 +0100
commitd818e51174e8d5684719b7e09dcd2d83c315944d (patch)
tree264df646c08e4719f4dac110d62af11f64c20aab /lib/pthreadpool
parent7882941b7336c97cc68c915e07c535d2b69f181c (diff)
downloadsamba-d818e51174e8d5684719b7e09dcd2d83c315944d.tar.gz
Revert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()"
This reverts commit 9b73fda926eb8493e80012794483039be66d4e6c. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/pthreadpool')
-rw-r--r--lib/pthreadpool/pthreadpool_tevent.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/pthreadpool/pthreadpool_tevent.c b/lib/pthreadpool/pthreadpool_tevent.c
index 604763c0733..db20ddc1530 100644
--- a/lib/pthreadpool/pthreadpool_tevent.c
+++ b/lib/pthreadpool/pthreadpool_tevent.c
@@ -26,39 +26,8 @@
#include "lib/util/dlinklist.h"
#include "lib/util/attr.h"
-/*
- * We try to give some hints to helgrind/drd
- *
- * Note ANNOTATE_BENIGN_RACE_SIZED(address, size, describtion)
- * takes an memory address range that ignored by helgrind/drd
- * 'description' is just ignored...
- *
- *
- * Note that ANNOTATE_HAPPENS_*(unique_uintptr)
- * just takes a DWORD/(void *) as unique key
- * for the barrier.
- */
-#ifdef HAVE_VALGRIND_HELGRIND_H
-#include <valgrind/helgrind.h>
-#endif
-#ifndef ANNOTATE_BENIGN_RACE_SIZED
-#define ANNOTATE_BENIGN_RACE_SIZED(address, size, describtion)
-#endif
-#ifndef ANNOTATE_HAPPENS_BEFORE
-#define ANNOTATE_HAPPENS_BEFORE(unique_uintptr)
-#endif
-#ifndef ANNOTATE_HAPPENS_AFTER
-#define ANNOTATE_HAPPENS_AFTER(unique_uintptr)
-#endif
-#ifndef ANNOTATE_HAPPENS_BEFORE_FORGET_ALL
-#define ANNOTATE_HAPPENS_BEFORE_FORGET_ALL(unique_uintptr)
-#endif
-
#define PTHREAD_TEVENT_JOB_THREAD_FENCE_INIT(__job) do { \
_UNUSED_ const struct pthreadpool_tevent_job *__j = __job; \
- ANNOTATE_BENIGN_RACE_SIZED(&__j->needs_fence, \
- sizeof(__j->needs_fence), \
- "race by design, protected by fence"); \
} while(0);
#ifdef WITH_PTHREADPOOL
@@ -80,14 +49,11 @@
#define PTHREAD_TEVENT_JOB_THREAD_FENCE(__job) do { \
_UNUSED_ const struct pthreadpool_tevent_job *__j = __job; \
- ANNOTATE_HAPPENS_BEFORE(&__job->needs_fence); \
__PTHREAD_TEVENT_JOB_THREAD_FENCE(memory_order_seq_cst); \
- ANNOTATE_HAPPENS_AFTER(&__job->needs_fence); \
} while(0);
#define PTHREAD_TEVENT_JOB_THREAD_FENCE_FINI(__job) do { \
_UNUSED_ const struct pthreadpool_tevent_job *__j = __job; \
- ANNOTATE_HAPPENS_BEFORE_FORGET_ALL(&__job->needs_fence); \
} while(0);
struct pthreadpool_tevent_job_state;