aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/port
diff options
context:
space:
mode:
authorVinnie Falco <vinnie.falco@gmail.com>2013-07-01 08:36:32 -0700
committerVinnie Falco <vinnie.falco@gmail.com>2013-07-01 08:36:32 -0700
commitfb1da62318f5a7f6e3ec31cdc02178a5445870e4 (patch)
tree4ef6f0b1017c747e84132427666eea4a36d10b0d /src/leveldb/port
parent28bcf3b7ef804f7084938b21708b29c1f5d7c8f8 (diff)
parentadae78ea9940f4d44382967d1296e7db0b54a4de (diff)
Merge commit 'adae78ea9940f4d44382967d1296e7db0b54a4de' into leveldb-squashed
Diffstat (limited to 'src/leveldb/port')
-rw-r--r--src/leveldb/port/port_win.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/leveldb/port/port_win.cc b/src/leveldb/port/port_win.cc
index 99c1d8e346..1b0f060a19 100644
--- a/src/leveldb/port/port_win.cc
+++ b/src/leveldb/port/port_win.cc
@@ -109,12 +109,10 @@ void CondVar::Signal() {
void CondVar::SignalAll() {
wait_mtx_.Lock();
- for(long i = 0; i < waiting_; ++i) {
- ::ReleaseSemaphore(sem1_, 1, NULL);
- while(waiting_ > 0) {
- --waiting_;
- ::WaitForSingleObject(sem2_, INFINITE);
- }
+ ::ReleaseSemaphore(sem1_, waiting_, NULL);
+ while(waiting_ > 0) {
+ --waiting_;
+ ::WaitForSingleObject(sem2_, INFINITE);
}
wait_mtx_.Unlock();
}