diff options
| author | bors <bors@rust-lang.org> | 2014-02-03 13:11:35 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-03 13:11:35 -0800 |
| commit | d42521aa92006a3378c535adec80ae2257bff083 (patch) | |
| tree | 0790d82726f49abc6d37b8ac5c8ca0fbec7e0685 /src/rustllvm/RustWrapper.cpp | |
| parent | cb40eba4b1ce12914612914b94bdccd251a9f554 (diff) | |
| parent | acacfb20fd34162cfba5a4e7b5f1447e0403fa50 (diff) | |
| download | rust-d42521aa92006a3378c535adec80ae2257bff083.tar.gz rust-d42521aa92006a3378c535adec80ae2257bff083.zip | |
auto merge of #11866 : alexcrichton/rust/atomic-u64, r=brson
Let's try this again. This is an implementation of mutexes which I believe is free from undefined behavior of OS mutexes (the pitfall of the previous implementation). This implementation is not ideal. There's a yield-loop spot, and it's not particularly fair with respect to lockers who steal without going through the normal code paths. That being said, I believe that this is a correct implementation which is a stepping stone to move from. I haven't done rigorous benchmarking of this mutex, but preliminary results show that it's about 25% slower in the uncontended case on linux (same runtime on OSX), and it's actually faster than a pthreads mutex on high contention (again, not rigorous benchmarking, I just saw these numbers come up).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
