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

Issue 419113002: Fix thread unsafe mutex initialization. (Closed)

Created:
6 years, 5 months ago by bungeman-skia
Modified:
6 years, 5 months ago
Reviewers:
reed, mtklein, bsalomon, robertphillips
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 6

Patch Set 2 : Mac defines 'nil', gcc wants impls. #

Patch Set 3 : gcc also wants impls to be inline or used. #

Total comments: 1

Patch Set 4 : Reformat and add comments. #

Patch Set 5 : Clang 3.5 does not like unused static inlines in .cpp. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M src/ports/SkMutex_pthread.h View 1 2 3 4 1 chunk +7 lines, -5 lines 0 comments Download
M src/ports/SkMutex_win.h View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
bungeman-skia
A bit early as I haven't really reviewed this myself, but it seems to work.
6 years, 5 months ago (2014-07-24 23:00:20 UTC) #1
mtklein
lgtm, with some questions https://codereview.chromium.org/419113002/diff/1/include/core/SkInstCnt.h File include/core/SkInstCnt.h (right): https://codereview.chromium.org/419113002/diff/1/include/core/SkInstCnt.h#newcode80 include/core/SkInstCnt.h:80: static SkMutex* childrenMutex = (SkMutex*)className::SkInstanceCountHelper::nil; ...
6 years, 5 months ago (2014-07-25 12:35:34 UTC) #2
bsalomon
Looks like you'll have to either remove the static from the function, define it, or ...
6 years, 5 months ago (2014-07-25 13:01:20 UTC) #3
mtklein
> Mike, I think the difficulty with having a static member is that we'd need ...
6 years, 5 months ago (2014-07-25 13:14:02 UTC) #4
bsalomon
On 2014/07/25 13:14:02, mtklein wrote: > > Mike, I think the difficulty with having a ...
6 years, 5 months ago (2014-07-25 13:56:51 UTC) #5
bungeman-skia
bsalomon pretty much already said this out of line, but I'd already written these inline, ...
6 years, 5 months ago (2014-07-25 14:40:40 UTC) #6
bungeman-skia
https://codereview.chromium.org/419113002/diff/40001/include/core/SkInstCnt.h File include/core/SkInstCnt.h (right): https://codereview.chromium.org/419113002/diff/40001/include/core/SkInstCnt.h#newcode83 include/core/SkInstCnt.h:83: return *childrenMutex; \ Making this body look like SK_DECLARE_STATIC_LAZY_PTR(SkMutex, ...
6 years, 5 months ago (2014-07-25 15:44:07 UTC) #7
bsalomon
lgtm
6 years, 5 months ago (2014-07-25 17:45:31 UTC) #8
bungeman-skia
The CQ bit was checked by bungeman@google.com
6 years, 5 months ago (2014-07-25 18:40:49 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/bungeman@google.com/419113002/60001
6 years, 5 months ago (2014-07-25 18:41:12 UTC) #10
commit-bot: I haz the power
Change committed as d6aeb6dc8fe21066f1a2c4813a4256a3acd3edf5
6 years, 5 months ago (2014-07-25 18:52:53 UTC) #11
bungeman-skia
The CQ bit was checked by bungeman@google.com
6 years, 5 months ago (2014-07-25 21:58:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/bungeman@google.com/419113002/80001
6 years, 5 months ago (2014-07-25 21:58:44 UTC) #13
commit-bot: I haz the power
6 years, 5 months ago (2014-07-25 22:11:08 UTC) #14
Message was sent while issue was closed.
Change committed as 1ef960b01b3d76d9dac19a0d38d71dd03bbb9f21

Powered by Google App Engine
This is Rietveld 408576698