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:
ec4f36c
)
ms-queue: add initialization
author
Brian Norris
<banorris@uci.edu>
Thu, 7 Mar 2013 03:31:31 +0000
(19:31 -0800)
committer
Brian Norris
<banorris@uci.edu>
Thu, 7 Mar 2013 03:31:31 +0000
(19:31 -0800)
ms-queue/my_queue.c
patch
|
blob
|
history
diff --git
a/ms-queue/my_queue.c
b/ms-queue/my_queue.c
index bb62fa781183c98f5c7727cdbb79114012749029..2377d01a4679cad3a4bdcc3175aa01bfed26ccec 100644
(file)
--- a/
ms-queue/my_queue.c
+++ b/
ms-queue/my_queue.c
@@
-27,6
+27,9
@@
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);