field changes to barrier
This commit is contained in:
parent
f4cce4fcd9
commit
1920f86326
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -93,10 +93,11 @@ function barrier_ready() {
|
||||||
WAIT_TIMEOUT = 200
|
WAIT_TIMEOUT = 200
|
||||||
timeW=0
|
timeW=0
|
||||||
function barrier_wait(threshold, transf) {
|
function barrier_wait(threshold, transf) {
|
||||||
|
barrier.put(id, 1)
|
||||||
barrier.get(id)
|
barrier.get(id)
|
||||||
CURSTATE = "BARRIERWAIT"
|
CURSTATE = "BARRIERWAIT"
|
||||||
if(barrier.size() >= threshold) {
|
if(barrier.size() >= threshold) {
|
||||||
barrier = nil
|
# barrier = nil
|
||||||
transf()
|
transf()
|
||||||
} else if(timeW>=WAIT_TIMEOUT) {
|
} else if(timeW>=WAIT_TIMEOUT) {
|
||||||
barrier = nil
|
barrier = nil
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue