From: bdemsky Date: Thu, 17 Dec 2015 08:43:12 +0000 (-0800) Subject: fix compile errors on OS X X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker-benchmarks.git;a=commitdiff_plain;h=98c3f7ebd9ddbe5a64fd9c6b6408d4ad3f7b41d8;ds=inline fix compile errors on OS X --- diff --git a/cliffc-hashtable/cliffc_hashtable.h b/cliffc-hashtable/cliffc_hashtable.h index c5c251c..876a89b 100644 --- a/cliffc-hashtable/cliffc_hashtable.h +++ b/cliffc-hashtable/cliffc_hashtable.h @@ -1,7 +1,6 @@ #ifndef CLIFFC_HASHTABLE_H #define CLIFFC_HASHTABLE_H -#include #include #include "stdio.h" //#include diff --git a/cliffc-hashtable/main.cc b/cliffc-hashtable/main.cc index 8d94528..b29f765 100644 --- a/cliffc-hashtable/main.cc +++ b/cliffc-hashtable/main.cc @@ -1,4 +1,3 @@ -#include #include #include "cliffc_hashtable.h" diff --git a/concurrent-hashmap/hashmap.h b/concurrent-hashmap/hashmap.h index 68dd815..f4deb8f 100644 --- a/concurrent-hashmap/hashmap.h +++ b/concurrent-hashmap/hashmap.h @@ -1,7 +1,6 @@ #ifndef _HASHMAP_H #define _HASHMAP_H -#include #include #include "stdio.h" //#include diff --git a/treiber-stack/main.c b/treiber-stack/main.c index d27242e..6342d84 100644 --- a/treiber-stack/main.c +++ b/treiber-stack/main.c @@ -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; diff --git a/treiber-stack/my_stack.c b/treiber-stack/my_stack.c index 5f3cc89..f65417d 100644 --- a/treiber-stack/my_stack.c +++ b/treiber-stack/my_stack.c @@ -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; diff --git a/treiber-stack/my_stack.h b/treiber-stack/my_stack.h index 8d4d789..ebb8baa 100644 --- a/treiber-stack/my_stack.h +++ b/treiber-stack/my_stack.h @@ -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();