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

Issue 956013002: fix race to set the new gen ID (Closed)

Created:
5 years, 10 months ago by mtklein_C
Modified:
5 years, 10 months ago
Reviewers:
*bungeman-skia, mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix the race to set the new gen ID. There's a small window where two threads can both see the gen ID is zero, both go get new distinct genIDs, but race to write them. This now uses compare_exchange to read and leave the winner's ID in place when there's a race. SkAtomics isn't public. TBR=reed@google.com BUG=skia: Committed: https://skia.googlesource.com/skia/+/59c9203321cf4afb48597f39e4bdd4ae91da12a0

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : comma #

Patch Set 4 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -3 lines) Patch
M include/core/SkAtomics.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/core/SkPixelRef.cpp View 1 2 3 1 chunk +8 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
mtklein_C
5 years, 10 months ago (2015-02-25 17:19:37 UTC) #2
reed1
ben, can you take a peek?
5 years, 10 months ago (2015-02-25 17:26:13 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/956013002/60001
5 years, 10 months ago (2015-02-25 18:18:18 UTC) #7
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 10 months ago (2015-02-25 18:18:19 UTC) #8
commit-bot: I haz the power
Presubmit check for 956013002-60001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 10 months ago (2015-02-25 18:18:24 UTC) #10
bungeman-skia
lgtm, if it works
5 years, 10 months ago (2015-02-25 19:43:01 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/956013002/60001
5 years, 10 months ago (2015-02-25 20:35:53 UTC) #13
commit-bot: I haz the power
5 years, 10 months ago (2015-02-25 20:52:00 UTC) #14
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://skia.googlesource.com/skia/+/59c9203321cf4afb48597f39e4bdd4ae91da12a0

Powered by Google App Engine
This is Rietveld 408576698