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

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

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 years, 10 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/logging.cc ('k') | src/base/platform/time.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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 return event; 176 return event;
177 } 177 }
178 178
179 179
180 void ConditionVariable::NativeHandle::Post(Event* event, bool result) { 180 void ConditionVariable::NativeHandle::Post(Event* event, bool result) {
181 LockGuard<Mutex> lock_guard(&mutex_); 181 LockGuard<Mutex> lock_guard(&mutex_);
182 182
183 // Remove the event from the wait list. 183 // Remove the event from the wait list.
184 for (Event** wep = &waitlist_;; wep = &(*wep)->next_) { 184 for (Event** wep = &waitlist_;; wep = &(*wep)->next_) {
185 DCHECK_NE(NULL, *wep); 185 DCHECK(*wep);
186 if (*wep == event) { 186 if (*wep == event) {
187 *wep = event->next_; 187 *wep = event->next_;
188 break; 188 break;
189 } 189 }
190 } 190 }
191 191
192 #ifdef DEBUG 192 #ifdef DEBUG
193 // The event must not be on the free list. 193 // The event must not be on the free list.
194 for (Event* fe = freelist_; fe != NULL; fe = fe->next_) { 194 for (Event* fe = freelist_; fe != NULL; fe = fe->next_) {
195 DCHECK_NE(event, fe); 195 DCHECK_NE(event, fe);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Release the wait event. 313 // Release the wait event.
314 DCHECK(!result || event->notified_); 314 DCHECK(!result || event->notified_);
315 native_handle_.Post(event, result); 315 native_handle_.Post(event, result);
316 316
317 return result; 317 return result;
318 } 318 }
319 319
320 #endif // V8_OS_POSIX 320 #endif // V8_OS_POSIX
321 321
322 } } // namespace v8::base 322 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/logging.cc ('k') | src/base/platform/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698