Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: src/base/platform/condition-variable.cc

Issue 1365803004: [presubmit] Fix whitespace/semicolon linter violations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/base/bits.h ('k') | src/debug/debug.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/base/platform/condition-variable.h" 5 #include "src/base/platform/condition-variable.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <time.h> 8 #include <time.h>
9 9
10 #include "src/base/platform/time.h" 10 #include "src/base/platform/time.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 258
259 void ConditionVariable::Wait(Mutex* mutex) { 259 void ConditionVariable::Wait(Mutex* mutex) {
260 // Create and setup the wait event. 260 // Create and setup the wait event.
261 Event* event = native_handle_.Pre(); 261 Event* event = native_handle_.Pre();
262 262
263 // Release the user mutex. 263 // Release the user mutex.
264 mutex->Unlock(); 264 mutex->Unlock();
265 265
266 // Wait on the wait event. 266 // Wait on the wait event.
267 while (!event->WaitFor(INFINITE)) 267 while (!event->WaitFor(INFINITE)) {
268 ; 268 }
269 269
270 // Reaquire the user mutex. 270 // Reaquire the user mutex.
271 mutex->Lock(); 271 mutex->Lock();
272 272
273 // Release the wait event (we must have been notified). 273 // Release the wait event (we must have been notified).
274 DCHECK(event->notified_); 274 DCHECK(event->notified_);
275 native_handle_.Post(event, true); 275 native_handle_.Post(event, true);
276 } 276 }
277 277
278 278
(...skipping 28 matching lines...) Expand all
307 // Release the wait event. 307 // Release the wait event.
308 DCHECK(!result || event->notified_); 308 DCHECK(!result || event->notified_);
309 native_handle_.Post(event, result); 309 native_handle_.Post(event, result);
310 310
311 return result; 311 return result;
312 } 312 }
313 313
314 #endif // V8_OS_POSIX 314 #endif // V8_OS_POSIX
315 315
316 } } // namespace v8::base 316 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/bits.h ('k') | src/debug/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698