-
Leszek Swirski authored
mjsunit/regress/regress-crbug-9161 had two spinlocks on an atomic: 1. WaitUntil(lock == kStageRunning) 2. WaitUntil(lock == kStageDone) But, in theory the worker updating the "lock" could progress all the way to kStageDone before the first loop manages to check the lock value again. We can make this more robust by checking: 1. WaitUntil(lock != kStageInit) 2. WaitUntil(lock == kStageDone) That way both loops check for _any_ state past the state they want to progress past. Bug: v8:11437 Change-Id: I5220e61070a305301c678928edb0925c04dae970 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3231339 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#77460}
70a0baaa