fix compile errors on OS X
authorbdemsky <bdemsky@uci.edu>
Thu, 17 Dec 2015 08:43:12 +0000 (00:43 -0800)
committerbdemsky <bdemsky@uci.edu>
Thu, 17 Dec 2015 08:43:12 +0000 (00:43 -0800)
cliffc-hashtable/cliffc_hashtable.h
cliffc-hashtable/main.cc
concurrent-hashmap/hashmap.h
treiber-stack/main.c
treiber-stack/my_stack.c
treiber-stack/my_stack.h

index c5c251ce969ae26c2cfd752cbf721c73f0b914a5..876a89b1f7382a6d2902a8a7ba45dc69c9983e8c 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef CLIFFC_HASHTABLE_H
 #define CLIFFC_HASHTABLE_H
 
-#include <iostream>
 #include <atomic>
 #include "stdio.h" 
 //#include <common.h>
index 8d94528f21e0d6fa99e2a6e259c761544bfdfea7..b29f765a321981a1f80a434bb568e80c2735673c 100644 (file)
@@ -1,4 +1,3 @@
-#include <iostream>
 #include <threads.h>
 #include "cliffc_hashtable.h"
 
index 68dd8154a146a35eac078aebed3da4cfddef909f..f4deb8fe622ca35a85926ac8000c2108c1c1470c 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _HASHMAP_H
 #define _HASHMAP_H
 
-#include <iostream>
 #include <atomic>
 #include "stdio.h" 
 //#include <common.h>
index d27242eda29c3be259099f53aca97dd3e7e2fe17..6342d84cbad8ef2cf8b1627ac9a3870e7e8e110d 100644 (file)
@@ -6,7 +6,7 @@
 #include "model-assert.h"
 
 static int procs = 4;
-static stack_t *stack;
+static mystack_t *stack;
 static thrd_t *threads;
 static int num_threads;
 
index 5f3cc89300d9b621e91c59227633af8929a64cf3..f65417df89f90f64b8b07ad70e866f7341ef99a0 100644 (file)
@@ -56,7 +56,7 @@ static void reclaim(unsigned int node)
        MODEL_ASSERT(0);
 }
 
-void init_stack(stack_t *s, int num_threads)
+void init_stack(mystack_t *s, int num_threads)
 {
        int i, j;
 
@@ -74,7 +74,7 @@ void init_stack(stack_t *s, int num_threads)
        atomic_init(&s->top, MAKE_POINTER(0, 0));
 }
 
-void push(stack_t *s, unsigned int val) {
+void push(mystack_t *s, unsigned int val) {
        unsigned int nodeIdx = new_node();
        node_t *node = &s->nodes[nodeIdx];
        node->value = val;
@@ -95,7 +95,7 @@ void push(stack_t *s, unsigned int val) {
        } 
 }
 
-unsigned int pop(stack_t *s) 
+unsigned int pop(mystack_t *s) 
 {
        pointer oldTop, newTop, next;
        node_t *node;
index 8d4d789ef7da1fdbf3a506c24764e09906c29bfe..ebb8baaaf2282035db0dec61228087959be0dea8 100644 (file)
@@ -27,9 +27,9 @@ typedef struct node {
 typedef struct {
        pointer_t top;
        node_t nodes[MAX_NODES + 1];
-} stack_t;
+} mystack_t;
 
-void init_stack(stack_t *s, int num_threads);
-void push(stack_t *s, unsigned int val);
-unsigned int pop(stack_t *s);
+void init_stack(mystack_t *s, int num_threads);
+void push(mystack_t *s, unsigned int val);
+unsigned int pop(mystack_t *s);
 int get_thread_num();