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

Issue 2206263002: Add Lock::HandlesMultipleThreadPriorities(). (Closed)

Created:
4 years, 4 months ago by fdoray
Modified:
4 years, 4 months ago
Reviewers:
robliao, Lei Zhang, gab
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Lock::HandlesMultipleThreadPriorities(). This static method is available on all platform. It replaces Lock::PriorityInheritanceAvailable(). It will simplify code that checks whether priority inversion will be mitigated when Lock is used from different thread priorities. E.g.: if (Lock::Lock::PriorityInheritanceAvailable()) PlatformThread::SetCurrentThreadPriority(...); Becomes: if (Lock::HandlesMultipleThreadPriorities()) PlatformThread::SetCurrentThreadPriority(...); BUG=611856 Committed: https://crrev.com/d84dc069a147eb0209b9f7713beafb3de0dec26b Cr-Commit-Position: refs/heads/master@{#409890}

Patch Set 1 #

Total comments: 4

Patch Set 2 : rename to HandlesMultipleThreadPriorities, #elif defined(OS_WIN) #

Patch Set 3 : self-review #

Total comments: 7

Patch Set 4 : CR gab/robliao #10-11 #

Total comments: 6

Patch Set 5 : CR robliao #14 (improve comment) #

Patch Set 6 : CR gab #18 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -4 lines) Patch
M base/synchronization/lock.h View 1 2 3 4 5 1 chunk +13 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
fdoray
PTAL
4 years, 4 months ago (2016-08-03 14:59:45 UTC) #4
robliao
https://codereview.chromium.org/2206263002/diff/1/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/1/base/synchronization/lock.h#newcode66 base/synchronization/lock.h:66: static bool IsSafeWithMultipleThreadPriorities() { I would go with HandlesMultipleThreadPriorities. ...
4 years, 4 months ago (2016-08-03 18:02:10 UTC) #5
gab
https://codereview.chromium.org/2206263002/diff/1/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/1/base/synchronization/lock.h#newcode70 base/synchronization/lock.h:70: return true; Add a comment about why that's true ...
4 years, 4 months ago (2016-08-03 18:04:58 UTC) #6
fdoray
PTAnL https://codereview.chromium.org/2206263002/diff/1/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/1/base/synchronization/lock.h#newcode66 base/synchronization/lock.h:66: static bool IsSafeWithMultipleThreadPriorities() { On 2016/08/03 18:02:10, robliao ...
4 years, 4 months ago (2016-08-03 18:34:49 UTC) #9
gab
https://codereview.chromium.org/2206263002/diff/40001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/40001/base/synchronization/lock.h#newcode68 base/synchronization/lock.h:68: // unbounded amount of time by holding a Lock. ...
4 years, 4 months ago (2016-08-03 18:47:25 UTC) #10
robliao
https://codereview.chromium.org/2206263002/diff/40001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/40001/base/synchronization/lock.h#newcode68 base/synchronization/lock.h:68: // unbounded amount of time by holding a Lock. ...
4 years, 4 months ago (2016-08-03 19:17:15 UTC) #11
robliao
4 years, 4 months ago (2016-08-03 19:17:16 UTC) #12
fdoray
PTAnL https://codereview.chromium.org/2206263002/diff/40001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/40001/base/synchronization/lock.h#newcode68 base/synchronization/lock.h:68: // unbounded amount of time by holding a ...
4 years, 4 months ago (2016-08-03 19:24:09 UTC) #13
robliao
lgtm + comment. Thanks for the improvement! https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h#newcode64 base/synchronization/lock.h:64: // Whether ...
4 years, 4 months ago (2016-08-03 19:30:07 UTC) #14
fdoray
thestig@: PTAL https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h#newcode64 base/synchronization/lock.h:64: // Whether Lock mitigates priority inversion when ...
4 years, 4 months ago (2016-08-03 19:32:10 UTC) #15
Lei Zhang
lgtm if everyone else is happy
4 years, 4 months ago (2016-08-03 19:32:34 UTC) #16
fdoray
thestig@: Thanks. gab@: PTAL
4 years, 4 months ago (2016-08-03 19:33:07 UTC) #17
gab
https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h#newcode66 base/synchronization/lock.h:66: // a Lock to run when higher priority threads ...
4 years, 4 months ago (2016-08-03 19:36:25 UTC) #18
fdoray
gab@: PTAL https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h File base/synchronization/lock.h (right): https://codereview.chromium.org/2206263002/diff/60001/base/synchronization/lock.h#newcode66 base/synchronization/lock.h:66: // a Lock to run when higher ...
4 years, 4 months ago (2016-08-03 19:46:25 UTC) #19
fdoray
ping gab
4 years, 4 months ago (2016-08-04 18:11:42 UTC) #20
gab
lgtm
4 years, 4 months ago (2016-08-04 18:41:56 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2206263002/100001
4 years, 4 months ago (2016-08-04 18:46:18 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-04 20:36:41 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-08-04 20:38:17 UTC) #28
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/d84dc069a147eb0209b9f7713beafb3de0dec26b
Cr-Commit-Position: refs/heads/master@{#409890}

Powered by Google App Engine
This is Rietveld 408576698