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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount_node.cc

Issue 18644009: [NaCl SDK] Upate atomic ops in nacl_io (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add declartions for newval and oldval Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #include "nacl_io/mount_node.h" 5 #include "nacl_io/mount_node.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <string.h> 9 #include <string.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 Error MountNode::GetDents(size_t offs, 53 Error MountNode::GetDents(size_t offs,
54 struct dirent* pdir, 54 struct dirent* pdir,
55 size_t count, 55 size_t count,
56 int* out_bytes) { 56 int* out_bytes) {
57 *out_bytes = 0; 57 *out_bytes = 0;
58 return ENOTDIR; 58 return ENOTDIR;
59 } 59 }
60 60
61 Error MountNode::GetStat(struct stat* pstat) { 61 Error MountNode::GetStat(struct stat* pstat) {
62 AutoLock lock(&lock_); 62 AUTO_LOCK(node_lock_);
63 memcpy(pstat, &stat_, sizeof(stat_)); 63 memcpy(pstat, &stat_, sizeof(stat_));
64 return 0; 64 return 0;
65 } 65 }
66 66
67 Error MountNode::Ioctl(int request, char* arg) { return EINVAL; } 67 Error MountNode::Ioctl(int request, char* arg) { return EINVAL; }
68 68
69 Error MountNode::Read(size_t offs, void* buf, size_t count, int* out_bytes) { 69 Error MountNode::Read(size_t offs, void* buf, size_t count, int* out_bytes) {
70 *out_bytes = 0; 70 *out_bytes = 0;
71 return EINVAL; 71 return EINVAL;
72 } 72 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 out_node->reset(NULL); 142 out_node->reset(NULL);
143 return ENOTDIR; 143 return ENOTDIR;
144 } 144 }
145 145
146 int MountNode::ChildCount() { return 0; } 146 int MountNode::ChildCount() { return 0; }
147 147
148 void MountNode::Link() { stat_.st_nlink++; } 148 void MountNode::Link() { stat_.st_nlink++; }
149 149
150 void MountNode::Unlink() { stat_.st_nlink--; } 150 void MountNode::Unlink() { stat_.st_nlink--; }
151 151
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698