about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-18 21:51:31 -0800
committerbors <bors@rust-lang.org>2013-11-18 21:51:31 -0800
commitf5f5d5aac762a554850d291165536ba752260303 (patch)
tree56afc4b9b834d4496c175a3ab701823dbba72e15 /src/rustllvm/RustWrapper.cpp
parentab7fe9dd06e93986f6b11512031c891059474653 (diff)
parent508b7b996e5d557ec1c49e1d11563ecf4fc9d287 (diff)
downloadrust-f5f5d5aac762a554850d291165536ba752260303.tar.gz
rust-f5f5d5aac762a554850d291165536ba752260303.zip
auto merge of #10479 : alexcrichton/rust/native-mutex.rs, r=cmr
This adds a new `std::unstable::mutex` module which contains bindings to the platform-provided mutexes. This module is pretty much entirely unsafe to use, but is critical for the runtime and dropping our C++ dependency.

The actual implementation is to do a compare-and-swap on an initially uninitialized pointer. Pthreads does allow for static initialization, so this wouldn't be necessary if we had all the proper headers and whatnot, but windows it looks like will always require some sort of compare-and-swap operation. For now, I didn't want to have to define all the pthreads headers, so I continue to just malloc the pthreads lock/cvar.

After this, there's only one remaining C++ component of rust, and that's unwinding.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions