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

Side by Side Diff: src/futex-emulation.cc

Issue 2060213002: Revert of Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/global-handles.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/futex-emulation.h" 5 #include "src/futex-emulation.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/macros.h" 9 #include "src/base/macros.h"
10 #include "src/base/platform/time.h" 10 #include "src/base/platform/time.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // 2) After interrupted has been checked here, but before mutex_ is 135 // 2) After interrupted has been checked here, but before mutex_ is
136 // acquired: interrupted is checked again below, with mutex_ locked. 136 // acquired: interrupted is checked again below, with mutex_ locked.
137 // Because the wakeup signal also acquires mutex_, we know it will not 137 // Because the wakeup signal also acquires mutex_, we know it will not
138 // be able to notify until mutex_ is released below, when waiting on the 138 // be able to notify until mutex_ is released below, when waiting on the
139 // condition variable. 139 // condition variable.
140 // 3) After the mutex is released in the call to WaitFor(): this 140 // 3) After the mutex is released in the call to WaitFor(): this
141 // notification will wake up the condition variable. node->waiting() will 141 // notification will wake up the condition variable. node->waiting() will
142 // be false, so we'll loop and then check interrupts. 142 // be false, so we'll loop and then check interrupts.
143 if (interrupted) { 143 if (interrupted) {
144 Object* interrupt_object = isolate->stack_guard()->HandleInterrupts(); 144 Object* interrupt_object = isolate->stack_guard()->HandleInterrupts();
145 if (interrupt_object->IsException(isolate)) { 145 if (interrupt_object->IsException()) {
146 result = interrupt_object; 146 result = interrupt_object;
147 mutex_.Pointer()->Lock(); 147 mutex_.Pointer()->Lock();
148 break; 148 break;
149 } 149 }
150 } 150 }
151 151
152 mutex_.Pointer()->Lock(); 152 mutex_.Pointer()->Lock();
153 153
154 if (node->interrupted_) { 154 if (node->interrupted_) {
155 // An interrupt occured while the mutex_ was unlocked. Don't wait yet. 155 // An interrupt occured while the mutex_ was unlocked. Don't wait yet.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 269
270 node = node->next_; 270 node = node->next_;
271 } 271 }
272 272
273 return Smi::FromInt(waiters); 273 return Smi::FromInt(waiters);
274 } 274 }
275 275
276 } // namespace internal 276 } // namespace internal
277 } // namespace v8 277 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698