Import ConditionVariable class.
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 3 Sep 2013 07:30:01 +0000 (07:30 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 3 Sep 2013 07:30:01 +0000 (07:30 +0000)
commit281de965a4202a22f9515d62e83a4f5368ed70d8
treede11d0a63b4147b8bee90e4df8c86dd2aa4d74d9
parent366efa2ee31277c3f40fab7a3e4ae36cc3c8c637
Import ConditionVariable class.

Condition variables are synchronization primitives that can be used
to block one or more threads while waiting for condition to become
true.

Right now we have only semaphores, mutexes and atomic operations for
synchronization, which results in quite complex solutions where an
implementation using condition variables and mutexes would be straight
forward.

There's also a performance benefit to condition variables and mutexes
vs semaphores, especially on Windows, where semaphores are kernel
objects, while mutexes are implemented as fast critical sections,
it CAN be beneficial performance-wise to use condition variables
instead of semaphores.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23548007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/platform/condition-variable.cc [new file with mode: 0644]
src/platform/condition-variable.h [new file with mode: 0644]
src/platform/mutex.cc
src/platform/mutex.h
src/platform/time.cc
src/platform/time.h
src/x64/disasm-x64.cc
test/cctest/cctest.gyp
test/cctest/test-condition-variable.cc [new file with mode: 0644]
test/cctest/test-platform-linux.cc
tools/gyp/v8.gyp