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

Issue 18644009: [NaCl SDK] Upate atomic ops in nacl_io (Closed)

Created:
7 years, 5 months ago by noelallen1
Modified:
7 years, 5 months ago
Reviewers:
binji, nfullagar1
CC:
chromium-reviews, binji, Sam Clegg
Visibility:
Public.

Description

[NaCl SDK] Upate atomic ops in nacl_io Remove unneeded lock in mount_dev, mount root nodes do the locking. Add atomic and, or, xor. Remove lock from RefObject. Create SimpleLock. BUG=259563 R=binji@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211612

Patch Set 1 #

Total comments: 9

Patch Set 2 : Add AUTO_LOCK macro, switch to ref #

Patch Set 3 : 'Fix missing virtual destructor.' #

Patch Set 4 : 'Move comment to correct location' #

Total comments: 5

Patch Set 5 : Fix nits #

Patch Set 6 : Fix windows #

Patch Set 7 : Add declartions for newval and oldval #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -112 lines) Patch
M native_client_sdk/src/build_tools/sdk_files.list View 1 1 chunk +1 line, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/inode_pool.h View 1 3 chunks +4 lines, -11 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_handle.h View 1 2 3 4 2 chunks +12 lines, -2 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_handle.cc View 1 3 chunks +30 lines, -1 line 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_object.h View 1 2 chunks +5 lines, -3 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_object.cc View 1 10 chunks +11 lines, -19 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc View 1 10 chunks +9 lines, -24 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_dev.cc View 1 5 chunks +5 lines, -6 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_html5fs.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node_dir.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node_html5fs.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node_http.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M native_client_sdk/src/libraries/sdk_util/atomicops.h View 1 2 3 4 5 6 2 chunks +58 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/sdk_util/auto_lock.h View 1 2 3 4 2 chunks +13 lines, -2 lines 0 comments Download
M native_client_sdk/src/libraries/sdk_util/library.dsc View 1 chunk +1 line, -0 lines 0 comments Download
M native_client_sdk/src/libraries/sdk_util/ref_object.h View 1 2 3 4 chunks +7 lines, -12 lines 0 comments Download
A native_client_sdk/src/libraries/sdk_util/simple_lock.h View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/sdk_util/thread_pool.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M native_client_sdk/src/libraries/sdk_util/thread_pool.cc View 1 1 chunk +1 line, -9 lines 1 comment Download
M native_client_sdk/src/libraries/sdk_util/thread_safe_queue.h View 1 2 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
noelallen1
ptal
7 years, 5 months ago (2013-07-11 23:54:46 UTC) #1
binji
https://codereview.chromium.org/18644009/diff/1/native_client_sdk/src/libraries/sdk_util/atomicops.h File native_client_sdk/src/libraries/sdk_util/atomicops.h (right): https://codereview.chromium.org/18644009/diff/1/native_client_sdk/src/libraries/sdk_util/atomicops.h#newcode24 native_client_sdk/src/libraries/sdk_util/atomicops.h:24: inline Atomic32 AtomicAndFetch(volatile Atomic32* ptr, Atomic32 value) { these ...
7 years, 5 months ago (2013-07-12 00:51:23 UTC) #2
noelallen1
Converted AutoLock to take SimpleLock references. Added AUTO_LOCK macro so allow us to plug in ...
7 years, 5 months ago (2013-07-12 23:18:47 UTC) #3
binji
lgtm https://codereview.chromium.org/18644009/diff/1/native_client_sdk/src/libraries/sdk_util/simple_lock.h File native_client_sdk/src/libraries/sdk_util/simple_lock.h (right): https://codereview.chromium.org/18644009/diff/1/native_client_sdk/src/libraries/sdk_util/simple_lock.h#newcode20 native_client_sdk/src/libraries/sdk_util/simple_lock.h:20: class SimpleLock { On 2013/07/12 23:18:47, noelallen1 wrote: ...
7 years, 5 months ago (2013-07-13 00:16:47 UTC) #4
noelallen1
Committed patchset #7 manually as r211612 (presubmit successful).
7 years, 5 months ago (2013-07-14 23:48:12 UTC) #5
nfullagar1
7 years, 5 months ago (2013-07-18 00:18:06 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/18644009/diff/30001/native_client_sdk/src/lib...
File native_client_sdk/src/libraries/sdk_util/thread_pool.cc (right):

https://codereview.chromium.org/18644009/diff/30001/native_client_sdk/src/lib...
native_client_sdk/src/libraries/sdk_util/thread_pool.cc:63: return
AtomicAddFetch(&counter_, 1);
This should return the decremented task counter, but is incrementing it instead.
 This change is breaking all examples that are using threadpool.

Powered by Google App Engine
This is Rietveld 408576698