diff options
Diffstat (limited to 'src/pkg/runtime/parfor.c')
-rw-r--r-- | src/pkg/runtime/parfor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/parfor.c b/src/pkg/runtime/parfor.c index a4468c2af..ceaac8bc9 100644 --- a/src/pkg/runtime/parfor.c +++ b/src/pkg/runtime/parfor.c @@ -144,9 +144,9 @@ runtime·parfordo(ParFor *desc) if(victim >= tid) victim++; victimpos = &desc->thr[victim].pos; - pos = runtime·atomicload64(victimpos); for(;;) { // See if it has any work. + pos = runtime·atomicload64(victimpos); begin = (uint32)pos; end = (uint32)(pos>>32); if(begin+1 >= end) { @@ -159,7 +159,7 @@ runtime·parfordo(ParFor *desc) } begin2 = begin + (end-begin)/2; newpos = (uint64)begin | (uint64)begin2<<32; - if(runtime·cas64(victimpos, &pos, newpos)) { + if(runtime·cas64(victimpos, pos, newpos)) { begin = begin2; break; } |