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

Issue 7888055: Add a lock around getting and setting of source_ to avoid possible compiler reorderings. (Closed)

Created:
9 years, 3 months ago by awong
Modified:
9 years, 3 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell+watch_chromium.org, annacc+watch_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

Add a lock around getting and setting of source_ to avoid possible compiler reorderings. Also makes it very explicit that multi-threaded access is occuring. BUG=24801 TEST=will see how TSan handles this. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102067

Patch Set 1 #

Patch Set 2 : first patch #

Patch Set 3 : fix the function names. #

Patch Set 4 : More compile fixes #

Patch Set 5 : more compile fix #

Patch Set 6 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -11 lines) Patch
M media/audio/mac/audio_output_mac.h View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M media/audio/mac/audio_output_mac.cc View 1 2 3 4 8 chunks +24 lines, -11 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
awong
Carlos, I can't see how this is could deadlock, unless the RenderCallback needs to be ...
9 years, 3 months ago (2011-09-14 21:00:21 UTC) #1
awong
Frig. I just saw your comment. Okay, fine. So it may reenter. Frig. On 2011/09/14 ...
9 years, 3 months ago (2011-09-14 21:07:11 UTC) #2
awong
Looking at the documentation for AudioQueueNewInput: http://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/AudioQueueReference/Reference/reference.html#//apple_ref/doc/uid/TP40005117-CH3-SW31 I'm not seeing a mention of this possibly ...
9 years, 3 months ago (2011-09-14 21:17:51 UTC) #3
cpu_(ooo_6.6-7.5)
That pattern is equivalent to an atomic set, I mean there is no need for ...
9 years, 3 months ago (2011-09-15 04:19:33 UTC) #4
cpu_(ooo_6.6-7.5)
The one way a lock will actually do something would be if it extends past ...
9 years, 3 months ago (2011-09-15 04:24:26 UTC) #5
awong
Hey Carlos, Thanks for the explanation. Makes a lot more sense, and matches the memory ...
9 years, 3 months ago (2011-09-15 17:26:41 UTC) #6
cpu_(ooo_6.6-7.5)
lgtm. Sorry for making so many people waste time. It was a learning experience.
9 years, 3 months ago (2011-09-15 18:28:21 UTC) #7
commit-bot: I haz the power
9 years, 3 months ago (2011-09-21 01:53:28 UTC) #8
Change committed as 102067

Powered by Google App Engine
This is Rietveld 408576698