Commit a4ecb68d authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

wait counter increases need to be atomic now as they happen in parallel.

parent e4c2f0b8
......@@ -34,6 +34,7 @@
#include "runner.h"
/* Local headers. */
#include "atomic.h"
#include "const.h"
#include "engine.h"
#include "error.h"
......@@ -1292,7 +1293,7 @@ void *runner_main(void *data) {
case task_type_rewait:
for (struct task *t2 = (struct task *)t->ci; t2 != (struct task *)t->cj; t2++) {
for (k = 0; k < t2->nr_unlock_tasks; k++)
t2->unlock_tasks[k]->wait++;
atomic_inc(&t2->unlock_tasks[k]->wait);
}
break;
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment