equal
deleted
inserted
replaced
31 _nworkers(0), |
31 _nworkers(0), |
32 _nworking_stage0(0), |
32 _nworking_stage0(0), |
33 _nworking_stage1(0) {} |
33 _nworking_stage1(0) {} |
34 |
34 |
35 inline bool ZMarkTerminate::enter_stage(volatile uint* nworking_stage) { |
35 inline bool ZMarkTerminate::enter_stage(volatile uint* nworking_stage) { |
36 return Atomic::sub(1u, nworking_stage) == 0; |
36 return Atomic::sub(nworking_stage, 1u) == 0; |
37 } |
37 } |
38 |
38 |
39 inline void ZMarkTerminate::exit_stage(volatile uint* nworking_stage) { |
39 inline void ZMarkTerminate::exit_stage(volatile uint* nworking_stage) { |
40 Atomic::add(nworking_stage, 1u); |
40 Atomic::add(nworking_stage, 1u); |
41 } |
41 } |