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

Issue 1420043008: Create rtc::AtomicInt POD struct. (Closed)

Created:
5 years, 1 month ago by pbos-webrtc
Modified:
5 years, 1 month ago
Reviewers:
tommi, kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, yujie_mao (webrtc), Andrew MacDonald, henrika_webrtc, stefan-webrtc, tterriberry_mozilla.com, andresp, peah-webrtc, the sun, perkj_webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Create rtc::AtomicInt POD struct. Prevents accidental non-atomic reads, increments and stores since "volatile int" doesn't enforce atomic usage. BUG= R=kwiberg@webrtc.org, tommi@webrtc.org Committed: https://crrev.com/b27f590ece487819c3d1fda400315e582fb975b6 Cr-Commit-Position: refs/heads/master@{#10657}

Patch Set 1 #

Patch Set 2 : remove copy constructor #

Patch Set 3 : fix non-atomic use of playing_ and recording_ on iOS #

Patch Set 4 : const for AcquireLoad #

Patch Set 5 : decrement, oops #

Total comments: 4

Patch Set 6 : feedback #

Patch Set 7 : newlines #

Total comments: 4

Patch Set 8 : rebase #

Patch Set 9 : fix comments #

Total comments: 5

Patch Set 10 : ctor version, let's pray they are put in .data or .bss #

Total comments: 2

Patch Set 11 : default ctor #

Patch Set 12 : intentional obliteration of the unintentional whitespace of doom #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -111 lines) Patch
M webrtc/base/atomicops.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +41 lines, -0 lines 0 comments Download
M webrtc/base/criticalsection.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -5 lines 0 comments Download
M webrtc/base/criticalsection.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -8 lines 0 comments Download
M webrtc/base/refcount.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +112 lines, -62 lines 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_ios.h View 1 2 3 chunks +9 lines, -4 lines 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_ios.mm View 1 2 3 4 5 6 7 8 9 10 7 chunks +16 lines, -18 lines 0 comments Download
M webrtc/modules/pacing/packet_router.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/pacing/packet_router.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -5 lines 0 comments Download
M webrtc/system_wrappers/include/trace.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/system_wrappers/source/trace_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/video/video_capture_input.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/video/video_capture_input.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 55 (15 generated)
pbos-webrtc
remove copy constructor
5 years, 1 month ago (2015-11-02 10:56:12 UTC) #2
pbos-webrtc
fix non-atomic use of playing_ and recording_ on iOS
5 years, 1 month ago (2015-11-02 11:01:12 UTC) #3
pbos-webrtc
const for AcquireLoad
5 years, 1 month ago (2015-11-02 11:06:18 UTC) #4
pbos-webrtc
PTAL, this found a bug in webrtc/modules/audio_device/ios/audio_device_ios.mm. Plan's to then use this AtomicInt and remove ...
5 years, 1 month ago (2015-11-02 11:38:39 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/60001
5 years, 1 month ago (2015-11-02 11:39:53 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_compile_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_compile_dbg/builds/869)
5 years, 1 month ago (2015-11-02 11:44:06 UTC) #9
pbos-webrtc
decrement, oops
5 years, 1 month ago (2015-11-02 11:55:45 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/80001
5 years, 1 month ago (2015-11-02 11:57:51 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_drmemory_light on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_drmemory_light/builds/7559) win_rel on ...
5 years, 1 month ago (2015-11-02 12:01:49 UTC) #14
kwiberg-webrtc
https://codereview.webrtc.org/1420043008/diff/80001/webrtc/base/atomicops.h File webrtc/base/atomicops.h (right): https://codereview.webrtc.org/1420043008/diff/80001/webrtc/base/atomicops.h#newcode69 webrtc/base/atomicops.h:69: // the operations are atomic. Maybe "Functions are static, ...
5 years, 1 month ago (2015-11-02 12:41:50 UTC) #15
pbos-webrtc
feedback
5 years, 1 month ago (2015-11-02 15:21:07 UTC) #16
pbos-webrtc
https://codereview.webrtc.org/1420043008/diff/80001/webrtc/base/atomicops.h File webrtc/base/atomicops.h (right): https://codereview.webrtc.org/1420043008/diff/80001/webrtc/base/atomicops.h#newcode69 webrtc/base/atomicops.h:69: // the operations are atomic. On 2015/11/02 12:41:49, kwiberg-webrtc ...
5 years, 1 month ago (2015-11-02 15:21:15 UTC) #17
pbos-webrtc
newlines
5 years, 1 month ago (2015-11-02 15:22:10 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/120001
5 years, 1 month ago (2015-11-02 15:22:26 UTC) #20
pbos-webrtc
PTAL, motivation for this one right now is that it happened to find existing racy ...
5 years, 1 month ago (2015-11-02 15:23:20 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-02 17:04:45 UTC) #23
kwiberg-webrtc
lgtm, but consider adding the constructor I suggested https://codereview.webrtc.org/1420043008/diff/120001/webrtc/base/atomicops.h File webrtc/base/atomicops.h (right): https://codereview.webrtc.org/1420043008/diff/120001/webrtc/base/atomicops.h#newcode82 webrtc/base/atomicops.h:82: // ...
5 years, 1 month ago (2015-11-02 19:42:02 UTC) #24
pbos-webrtc
rebase
5 years, 1 month ago (2015-11-05 18:29:17 UTC) #25
pbos-webrtc
fix comments
5 years, 1 month ago (2015-11-05 18:32:18 UTC) #26
pbos-webrtc
Tommi PTAL https://codereview.webrtc.org/1420043008/diff/120001/webrtc/base/atomicops.h File webrtc/base/atomicops.h (right): https://codereview.webrtc.org/1420043008/diff/120001/webrtc/base/atomicops.h#newcode82 webrtc/base/atomicops.h:82: // Atomically increment |i|, returning the resulting ...
5 years, 1 month ago (2015-11-05 18:32:22 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/160001
5 years, 1 month ago (2015-11-06 22:40:42 UTC) #29
tommi
On 2015/11/05 18:32:22, pbos-webrtc wrote: > Tommi PTAL > > https://codereview.webrtc.org/1420043008/diff/120001/webrtc/base/atomicops.h > File webrtc/base/atomicops.h (right): ...
5 years, 1 month ago (2015-11-06 22:53:30 UTC) #30
tommi
https://codereview.webrtc.org/1420043008/diff/160001/talk/session/media/srtpfilter.cc File talk/session/media/srtpfilter.cc (right): https://codereview.webrtc.org/1420043008/diff/160001/talk/session/media/srtpfilter.cc#newcode485 talk/session/media/srtpfilter.cc:485: rtc::GlobalLockPod SrtpSession::lock_ = {{0}}; why this change? https://codereview.webrtc.org/1420043008/diff/160001/webrtc/base/atomicops.h File ...
5 years, 1 month ago (2015-11-06 22:53:36 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-06 23:43:43 UTC) #33
pbos-webrtc
I want static initialization to end up in the data or bss segment so that ...
5 years, 1 month ago (2015-11-10 15:59:24 UTC) #34
tommi
On 2015/11/10 15:59:24, pbos-webrtc wrote: > I want static initialization to end up in the ...
5 years, 1 month ago (2015-11-10 17:02:35 UTC) #35
pbos-webrtc
ctor version, let's pray they are put in .data or .bss
5 years, 1 month ago (2015-11-10 18:05:57 UTC) #36
pbos-webrtc
Let's give it a shot and see if we need to revert it. PTAL.
5 years, 1 month ago (2015-11-10 18:06:14 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/180001
5 years, 1 month ago (2015-11-10 18:07:02 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_gn_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_gn_dbg/builds/6810)
5 years, 1 month ago (2015-11-10 18:11:10 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/180001
5 years, 1 month ago (2015-11-10 19:00:52 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-10 20:16:33 UTC) #45
tommi
lgtm. crazy idea though: since all call sites initially set the atomic to 0, what ...
5 years, 1 month ago (2015-11-11 15:58:37 UTC) #46
pbos-webrtc
default ctor
5 years, 1 month ago (2015-11-16 18:07:54 UTC) #47
pbos-webrtc
intentional obliteration of the unintentional whitespace of doom
5 years, 1 month ago (2015-11-16 18:08:34 UTC) #48
pbos-webrtc
https://codereview.webrtc.org/1420043008/diff/180001/webrtc/base/atomicops.h File webrtc/base/atomicops.h (right): https://codereview.webrtc.org/1420043008/diff/180001/webrtc/base/atomicops.h#newcode67 webrtc/base/atomicops.h:67: // POD struct version of AtomicOps, prevents accidental non-atomic ...
5 years, 1 month ago (2015-11-16 18:10:42 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420043008/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420043008/220001
5 years, 1 month ago (2015-11-16 18:10:55 UTC) #52
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 1 month ago (2015-11-16 19:03:07 UTC) #53
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/b27f590ece487819c3d1fda400315e582fb975b6 Cr-Commit-Position: refs/heads/master@{#10657}
5 years, 1 month ago (2015-11-16 19:03:14 UTC) #54
pbos-webrtc
5 years, 1 month ago (2015-11-17 11:20:42 UTC) #55
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:220001) has been created in
https://codereview.webrtc.org/1453093002/ by pbos@webrtc.org.

The reason for reverting is: Caused static initializers.

BUG=chromium:556866
TBR=tommi@webrtc.org.

Powered by Google App Engine
This is Rietveld 408576698