Adds a compilation test for mcslock
[libcds.git] / test / stress / misc / mcslock_test.cpp
diff --git a/test/stress/misc/mcslock_test.cpp b/test/stress/misc/mcslock_test.cpp
new file mode 100644 (file)
index 0000000..960f71e
--- /dev/null
@@ -0,0 +1,25 @@
+#include "common.h"
+#include <atomic>
+#include <cds/gc/dhp.h>
+#include <cds/gc/hp.h>
+#include <cds/misc/mcs-lock.h>
+#include <cds_test/stress_test.h>
+#include <iostream>
+#include <memory>
+#include <thread>
+
+using namespace std;
+
+namespace {
+
+static size_t s_nMCSLockThreadCount = 4;
+static size_t s_nMCSLockPassCount = 3000000;
+
+cds_others::mcs_mutex m;
+
+} // namespace
+
+int main() {
+  cds_others::mcs_mutex::guard g(&m);
+  return 0;
+}