projects
/
model-checker-benchmarks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
490296b
)
fix compile errors on OS X
author
bdemsky
<bdemsky@uci.edu>
Thu, 17 Dec 2015 08:43:12 +0000
(
00:43
-0800)
committer
bdemsky
<bdemsky@uci.edu>
Thu, 17 Dec 2015 08:43:12 +0000
(
00:43
-0800)
cliffc-hashtable/cliffc_hashtable.h
patch
|
blob
|
history
cliffc-hashtable/main.cc
patch
|
blob
|
history
concurrent-hashmap/hashmap.h
patch
|
blob
|
history
treiber-stack/main.c
patch
|
blob
|
history
treiber-stack/my_stack.c
patch
|
blob
|
history
treiber-stack/my_stack.h
patch
|
blob
|
history
diff --git
a/cliffc-hashtable/cliffc_hashtable.h
b/cliffc-hashtable/cliffc_hashtable.h
index c5c251ce969ae26c2cfd752cbf721c73f0b914a5..876a89b1f7382a6d2902a8a7ba45dc69c9983e8c 100644
(file)
--- a/
cliffc-hashtable/cliffc_hashtable.h
+++ b/
cliffc-hashtable/cliffc_hashtable.h
@@
-1,7
+1,6
@@
#ifndef CLIFFC_HASHTABLE_H
#define CLIFFC_HASHTABLE_H
#ifndef CLIFFC_HASHTABLE_H
#define CLIFFC_HASHTABLE_H
-#include <iostream>
#include <atomic>
#include "stdio.h"
//#include <common.h>
#include <atomic>
#include "stdio.h"
//#include <common.h>
diff --git
a/cliffc-hashtable/main.cc
b/cliffc-hashtable/main.cc
index 8d94528f21e0d6fa99e2a6e259c761544bfdfea7..b29f765a321981a1f80a434bb568e80c2735673c 100644
(file)
--- a/
cliffc-hashtable/main.cc
+++ b/
cliffc-hashtable/main.cc
@@
-1,4
+1,3
@@
-#include <iostream>
#include <threads.h>
#include "cliffc_hashtable.h"
#include <threads.h>
#include "cliffc_hashtable.h"
diff --git
a/concurrent-hashmap/hashmap.h
b/concurrent-hashmap/hashmap.h
index 68dd8154a146a35eac078aebed3da4cfddef909f..f4deb8fe622ca35a85926ac8000c2108c1c1470c 100644
(file)
--- a/
concurrent-hashmap/hashmap.h
+++ b/
concurrent-hashmap/hashmap.h
@@
-1,7
+1,6
@@
#ifndef _HASHMAP_H
#define _HASHMAP_H
#ifndef _HASHMAP_H
#define _HASHMAP_H
-#include <iostream>
#include <atomic>
#include "stdio.h"
//#include <common.h>
#include <atomic>
#include "stdio.h"
//#include <common.h>
diff --git
a/treiber-stack/main.c
b/treiber-stack/main.c
index d27242eda29c3be259099f53aca97dd3e7e2fe17..6342d84cbad8ef2cf8b1627ac9a3870e7e8e110d 100644
(file)
--- a/
treiber-stack/main.c
+++ b/
treiber-stack/main.c
@@
-6,7
+6,7
@@
#include "model-assert.h"
static int procs = 4;
#include "model-assert.h"
static int procs = 4;
-static stack_t *stack;
+static
my
stack_t *stack;
static thrd_t *threads;
static int num_threads;
static thrd_t *threads;
static int num_threads;
diff --git
a/treiber-stack/my_stack.c
b/treiber-stack/my_stack.c
index 5f3cc89300d9b621e91c59227633af8929a64cf3..f65417df89f90f64b8b07ad70e866f7341ef99a0 100644
(file)
--- 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);
}
MODEL_ASSERT(0);
}
-void init_stack(stack_t *s, int num_threads)
+void init_stack(
my
stack_t *s, int num_threads)
{
int i, j;
{
int i, j;
@@
-74,7
+74,7
@@
void init_stack(stack_t *s, int num_threads)
atomic_init(&s->top, MAKE_POINTER(0, 0));
}
atomic_init(&s->top, MAKE_POINTER(0, 0));
}
-void push(stack_t *s, unsigned int val) {
+void push(
my
stack_t *s, unsigned int val) {
unsigned int nodeIdx = new_node();
node_t *node = &s->nodes[nodeIdx];
node->value = 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(
my
stack_t *s)
{
pointer oldTop, newTop, next;
node_t *node;
{
pointer oldTop, newTop, next;
node_t *node;
diff --git
a/treiber-stack/my_stack.h
b/treiber-stack/my_stack.h
index 8d4d789ef7da1fdbf3a506c24764e09906c29bfe..ebb8baaaf2282035db0dec61228087959be0dea8 100644
(file)
--- 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];
typedef struct {
pointer_t top;
node_t nodes[MAX_NODES + 1];
-} stack_t;
+}
my
stack_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(
my
stack_t *s, int num_threads);
+void push(
my
stack_t *s, unsigned int val);
+unsigned int pop(
my
stack_t *s);
int get_thread_num();
int get_thread_num();