search for: __sync_lock_release

Displaying 4 results from an estimated 4 matches for "__sync_lock_release".

Did you mean: __sync_lock_release_1
2008 Sep 17
0
[LLVMdev] llvm memory barrier as a builtin
...e,i1 true)". Is > that right? That's my understanding as well. > I would like a little finer control to express just a > write barrier (st-st) or a read barrier. My understanding is that the only types of finer grained control in gcc are the __sync_lock_test_and_set and __sync_lock_release which appear to implement acquire/release style barriers. http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Atomic-Builtins.html#Atomic-Builtins I expect that there will be large changes once the memory model for C++0X is released, and there may be things implemented in gcc branches or even undocume...
2008 Sep 17
2
[LLVMdev] llvm memory barrier as a builtin
Thanks for the info. My impression is that __sync_synchronize takes no arguments and is the memory barrier, i.e., "llvm.memory.barrier(i1 true,i1 true,i1 true,i1 true,i1 true)". Is that right? I would like a little finer control to express just a write barrier (st-st) or a read barrier. -- Mon Ping On Sep 17, 2008, at 5:50 AM, Andrew Lenharth wrote: > On Tue, Sep 16,
2008 Sep 18
1
[LLVMdev] llvm memory barrier as a builtin
...ht? > > That's my understanding as well. > >> I would like a little finer control to express just a >> write barrier (st-st) or a read barrier. > > My understanding is that the only types of finer grained control in > gcc > are the __sync_lock_test_and_set and __sync_lock_release which > appear to > implement acquire/release style barriers. > > http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Atomic-Builtins.html#Atomic-Builtins > > I expect that there will be large changes once the memory model for > C++0X is released, and there may be things implemented...
2008 Sep 25
0
[LLVMdev] Detecting mutex locks (and unlocks)
...__sync_lock_test_and_set builtin to llvm.atomic.swap, one could potentially look for IntrinsicInst with the appropriate IntrinsicID. But there's many ways to acquire a lock just using the atomic builtins [1] -- not to mention how a lock implements a blocking acquire. The lock release could use __sync_lock_release, which is converted into a regular function call of appropriate size, or the lock could just do a plain write of an i8 0 assuming a byte size memory location. I did a quick search and noticed some code using __sync_lock_test_and_set(&lock, 0) to exchange in a 0. [1] http://gcc.gnu.org/onlinedo...