about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2015-01-13 21:24:26 -0800
committerSteven Fackler <sfackler@gmail.com>2015-01-16 09:17:37 -0800
commit08f6380a9f0b866796080094f44fe25ea5636547 (patch)
treeb07f1154c5095e48f96369ce9d37988e33ae3d71 /src/rustllvm/RustWrapper.cpp
parent3d5fbae33897a8340542f21b6ded913148ca9199 (diff)
downloadrust-08f6380a9f0b866796080094f44fe25ea5636547.tar.gz
rust-08f6380a9f0b866796080094f44fe25ea5636547.zip
Rewrite Condvar::wait_timeout and make it public
**The implementation is a direct adaptation of libcxx's
condition_variable implementation.**

pthread_cond_timedwait uses the non-monotonic system clock. It's
possible to change the clock to a monotonic via pthread_cond_attr, but
this is incompatible with static initialization. To deal with this, we
calculate the timeout using the system clock, and maintain a separate
record of the start and end times with a monotonic clock to be used for
calculation of the return value.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions