spsc-queue: compilable
authorBrian Norris <banorris@uci.edu>
Fri, 12 Oct 2012 17:44:01 +0000 (10:44 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 12 Oct 2012 17:44:33 +0000 (10:44 -0700)
Makefile
spsc-queue/eventcount.h
spsc-queue/spsc-queue.cc

index 6b08fb0..e5ff6cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-DIRS := barrier mcs-lock mpmc-queue
+DIRS := barrier mcs-lock mpmc-queue spsc-queue
 
 .PHONY: $(DIRS)
 
index 4390cc5..aec3e8c 100644 (file)
@@ -40,7 +40,7 @@ std::memory_order_seq_cst);
                        if (cmp == (ec & 0x7FFFFFFF))
                        {
                                waiters += 1;
-                               cv.wait(guard, $);
+                               cv.wait(guard);
                        }
                        guard.unlock($);
                }
@@ -50,7 +50,7 @@ private:
        std::atomic<unsigned> count;
        rl::var<unsigned> waiters;
        std::mutex guard;
-       std::condition_variable_any cv;
+       std::condition_variable cv;
 
        void signal_impl(unsigned cmp)
        {
index ef7b026..b689936 100644 (file)
@@ -17,7 +17,7 @@ spsc_queue<int> q;
                }
        }
 
-int main()
+int user_main(int argc, char **argv)
 {
        thrd_t A, B;
        thrd_create(&A, (thrd_start_t)&thread, (void *)0);