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

Issue 23548007: Import ConditionVariable class. (Closed)

Created:
7 years, 3 months ago by Benedikt Meurer
Modified:
7 years, 3 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Import ConditionVariable class. Condition variables are synchronization primitives that can be used to block one or more threads while waiting for condition to become true. Right now we have only semaphores, mutexes and atomic operations for synchronization, which results in quite complex solutions where an implementation using condition variables and mutexes would be straight forward. There's also a performance benefit to condition variables and mutexes vs semaphores, especially on Windows, where semaphores are kernel objects, while mutexes are implemented as fast critical sections, it CAN be beneficial performance-wise to use condition variables instead of semaphores. R=mstarzinger@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16492

Patch Set 1 #

Patch Set 2 : Rename OperandSize members in disasm-x64.c because they conflict with Mach defines. #

Total comments: 8

Patch Set 3 : Rename Check*() methods of Mutex to Assert*(). #

Patch Set 4 : Rename OperandSize enum names. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+728 lines, -91 lines) Patch
A src/platform/condition-variable.h View 1 chunk +140 lines, -0 lines 0 comments Download
A src/platform/condition-variable.cc View 1 2 1 chunk +345 lines, -0 lines 0 comments Download
M src/platform/mutex.h View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M src/platform/mutex.cc View 1 2 3 chunks +9 lines, -18 lines 0 comments Download
M src/platform/time.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/platform/time.cc View 2 chunks +25 lines, -1 line 0 comments Download
M src/x64/disasm-x64.cc View 1 2 3 9 chunks +24 lines, -23 lines 0 comments Download
M test/cctest/cctest.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A test/cctest/test-condition-variable.cc View 1 chunk +162 lines, -0 lines 0 comments Download
M test/cctest/test-platform-linux.cc View 1 chunk +0 lines, -49 lines 0 comments Download
M tools/gyp/v8.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Benedikt Meurer
New ConditionVariable class, PTAL.
7 years, 3 months ago (2013-09-02 14:31:18 UTC) #1
Michael Starzinger
LGTM if all comments are addressed. https://codereview.chromium.org/23548007/diff/2001/src/platform/mutex.h File src/platform/mutex.h (right): https://codereview.chromium.org/23548007/diff/2001/src/platform/mutex.h#newcode44 src/platform/mutex.h:44: class ConditionVariable; There ...
7 years, 3 months ago (2013-09-02 19:12:43 UTC) #2
Benedikt Meurer
https://codereview.chromium.org/23548007/diff/2001/src/platform/mutex.h File src/platform/mutex.h (right): https://codereview.chromium.org/23548007/diff/2001/src/platform/mutex.h#newcode44 src/platform/mutex.h:44: class ConditionVariable; On 2013/09/02 19:12:43, Michael Starzinger wrote: > ...
7 years, 3 months ago (2013-09-03 07:27:39 UTC) #3
Benedikt Meurer
7 years, 3 months ago (2013-09-03 07:30:16 UTC) #4
Message was sent while issue was closed.
Committed patchset #4 manually as r16492 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698