Skip to content

Commit

Permalink
Add queue_free to each queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoran Yang committed Dec 31, 2015
1 parent 537c8c5 commit c1a2716
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
@@ -1,4 +1,4 @@
TESTS = wfqueue wfqueue0#lcrq ccqueue msqueue faa delay
TESTS = wfqueue wfqueue0 lcrq ccqueue msqueue faa delay

CC = gcc
CFLAGS = -g -Wall -O3 -pthread -D_GNU_SOURCE
Expand Down Expand Up @@ -35,7 +35,7 @@ msqueue: CFLAGS += -DMSQUEUE
faa: CFLAGS += -DFAAQ

$(TESTS): harness.o
wfqueue wfqueue0 lcrq ccqueue msqueue faa: pairwise.o
wfqueue wfqueue0 lcrq ccqueue msqueue faa: halfhalf.o
delay: delay.o

msqueue lcrq: hzdptr.o xxhash.o
Expand Down
1 change: 1 addition & 0 deletions ccqueue.c
Expand Up @@ -70,3 +70,4 @@ void * dequeue(queue_t * queue, handle_t * handle)
return node ? node->data : (void *) -1;
}

void queue_free(int id, int nprocs) {}
1 change: 1 addition & 0 deletions delay.c
Expand Up @@ -36,4 +36,5 @@ void * benchmark(int id, int nprocs) {
return NULL;
}

void thread_exit(int id, int nprocs) {}
int verify() { return 1; }
5 changes: 3 additions & 2 deletions driver
Expand Up @@ -12,13 +12,14 @@ T95=( \
2.080 2.074 2.069 2.064 2.060 2.056 2.052 2.048 2.045 2.042 \
)

TIMES[0]=$($@ | grep Mean | awk '{ print $5 }')
cmd="$@"
TIMES[0]=$(eval $cmd | grep Mean | awk '{ print $5 }')
SUM=${TIMES[0]}
printf '#%-2d %.2f\n' 1 ${TIMES[0]}

i=1
while true; do
TIME=$($@ | grep Mean | awk '{ print $5 }')
TIME=$(eval $cmd | grep Mean | awk '{ print $5 }')
TIMES[$i]=$TIME
SUM=$(echo "$SUM + $TIME" | bc)
N=$(($i + 1))
Expand Down
2 changes: 2 additions & 0 deletions faa.c
Expand Up @@ -18,3 +18,5 @@ void * dequeue(queue_t * q, handle_t * th)
return (void *) (long) *th;
}

void queue_free(queue_t * q, handle_t * h) {}

2 changes: 2 additions & 0 deletions lcrq.c
Expand Up @@ -240,3 +240,5 @@ void * dequeue(queue_t * q, handle_t * th)
return (void *) lcrq_get(q, th);
}

void queue_free(int id, int nprocs) {}

1 change: 1 addition & 0 deletions msqueue.c
Expand Up @@ -81,3 +81,4 @@ void * dequeue(queue_t * q, handle_t * handle)
return data;
}

void queue_free(int id, int nprocs) {}

0 comments on commit c1a2716

Please sign in to comment.