Permalink
Browse files

use ldc eatomic swap to avoid race condition

  • Loading branch information...
1 parent eb34af6 commit 943057b7a94e3040559b0d7ef6e278c7402443fa @wolfwood wolfwood committed Oct 24, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 arrowSection.d
View
@@ -68,10 +68,10 @@ class ArrowSection {
if(!fast){
// XXX: atomic swap on _input
- ubyte diff, cacheInput = _input;
- _input = 0;
+ ubyte diff, cacheInput;// = _input;
+ //_input = 0;
- //llvm_atomic_swap(&_input, cacheInput);
+ cacheInput = llvm_atomic_swap!(ubyte)(&_input, 0);
//cacheInput = _input;
//_input = 0;

0 comments on commit 943057b

Please sign in to comment.