This benchmark doesn't do much yet.
-DIRS := barrier
+DIRS := barrier mcs-lock
.PHONY: subdirs $(DIRS)
--- /dev/null
+include ../benchmarks.mk
+
+TESTNAME = mcs-lock
+
+all: $(TESTNAME)
+
+$(TESTNAME): $(TESTNAME).cc $(TESTNAME).h
+ $(CXX) -o $@ $< $(CPPFLAGS) $(LDFLAGS)
+
+clean:
+ rm -f $(TESTNAME) *.o
--- /dev/null
+#include <stdio.h>
+#include <threads.h>
+
+#include "mcs-lock.h"
+
+struct mcs_mutex *mutex;
+
+int user_main(int argc, char **argv)
+{
+ mcs_mutex::guard *g = new mcs_mutex::guard(mutex);
+ mutex->lock(g);
+ mutex->unlock(g);
+ return 0;
+}