projects
/
cdsspec-compiler.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edits
[cdsspec-compiler.git]
/
benchmark
/
spsc-bugfix
/
eventcount.h
diff --git
a/benchmark/spsc-bugfix/eventcount.h
b/benchmark/spsc-bugfix/eventcount.h
index b5d1c2fa25203f8918f056840e8a0b8c5c26c0c9..b22b6f2638f3bfd919915f5024319fc9418b21be 100644
(file)
--- a/
benchmark/spsc-bugfix/eventcount.h
+++ b/
benchmark/spsc-bugfix/eventcount.h
@@
-1,7
+1,7
@@
#ifndef _EVENTCOUNT_H
#define _EVENTCOUNT_H
#ifndef _EVENTCOUNT_H
#define _EVENTCOUNT_H
-#include <unrelacy.h>
+
//
#include <unrelacy.h>
#include <atomic>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <mutex>
#include <condition_variable>
@@
-22,6
+22,8
@@
public:
void signal()
{
void signal()
{
+ // We might be able to use release here because it basically only needs
+ // to synchronize with the get()
unsigned cmp = count.fetch_add(0, std::memory_order_seq_cst);
signal_impl(cmp);
}
unsigned cmp = count.fetch_add(0, std::memory_order_seq_cst);
signal_impl(cmp);
}