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:
84452c7
)
ms-queue: don't initialize node 0
author
Brian Norris
<banorris@uci.edu>
Fri, 8 Mar 2013 23:07:50 +0000
(15:07 -0800)
committer
Brian Norris
<banorris@uci.edu>
Fri, 8 Mar 2013 23:07:50 +0000
(15:07 -0800)
Node zero *should* be unused, since "0" is the NULL pointer index.
Removing this init will help catch bugs.
ms-queue/my_queue.c
patch
|
blob
|
history
diff --git
a/ms-queue/my_queue.c
b/ms-queue/my_queue.c
index d65840797b34e88402d78fe1b4b944533a2873dc..8a74060fb458e935b67faafc9322fdc4c3d445e2 100644
(file)
--- a/
ms-queue/my_queue.c
+++ b/
ms-queue/my_queue.c
@@
-31,9
+31,6
@@
void init_queue(queue_t *q, int num_threads)
for (i = 0; i < num_threads; i++)
node_nums[i] = 2 + i;
- /* Note: needed to add this init manually */
- atomic_init(&q->nodes[0].next, 0);
-
/* initialize queue */
head = MAKE_POINTER(1, 0);
tail = MAKE_POINTER(1, 0);