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

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

Issue 16325024: Move thread_pool.h into utils so it can be shared by more than one example. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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>
11 #include <string> 11 #include <string>
12 12
13 #include "nacl_io/kernel_wrap_real.h" 13 #include "nacl_io/kernel_wrap_real.h"
14 #include "nacl_io/mount.h" 14 #include "nacl_io/mount.h"
15 #include "nacl_io/osmman.h" 15 #include "nacl_io/osmman.h"
16 #include "utils/auto_lock.h" 16 #include "sdk_util/auto_lock.h"
17 17
18 static const int USR_ID = 1001; 18 static const int USR_ID = 1001;
19 static const int GRP_ID = 1002; 19 static const int GRP_ID = 1002;
20 20
21 MountNode::MountNode(Mount* mount) 21 MountNode::MountNode(Mount* mount)
22 : mount_(mount) { 22 : mount_(mount) {
23 memset(&stat_, 0, sizeof(stat_)); 23 memset(&stat_, 0, sizeof(stat_));
24 stat_.st_gid = GRP_ID; 24 stat_.st_gid = GRP_ID;
25 stat_.st_uid = USR_ID; 25 stat_.st_uid = USR_ID;
26 26
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 void MountNode::Link() { 164 void MountNode::Link() {
165 Acquire(); 165 Acquire();
166 stat_.st_nlink++; 166 stat_.st_nlink++;
167 } 167 }
168 168
169 void MountNode::Unlink() { 169 void MountNode::Unlink() {
170 stat_.st_nlink--; 170 stat_.st_nlink--;
171 Release(); 171 Release();
172 } 172 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_node.h ('k') | native_client_sdk/src/libraries/nacl_io/mount_node_dir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698