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

Side by Side Diff: native_client_sdk/src/libraries/nacl_mounts/kernel_handle.cc

Issue 10829027: [NaCl SDK] Add nacl_mounts to NaCl SDK build. Experimental for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync again Created 8 years, 4 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_mounts/kernel_handle.h"
5 6
6 #include <fcntl.h> 7 #include <fcntl.h>
7 #include <pthread.h> 8 #include <pthread.h>
8 9
9 #include "nacl_mounts/kernel_handle.h"
10 #include "nacl_mounts/mount.h" 10 #include "nacl_mounts/mount.h"
11 #include "nacl_mounts/mount_node.h" 11 #include "nacl_mounts/mount_node.h"
12 12
13
14 // It is only legal to construct a handle while the kernel lock is held. 13 // It is only legal to construct a handle while the kernel lock is held.
15 KernelHandle::KernelHandle(Mount* mnt, MountNode* node, int mode) 14 KernelHandle::KernelHandle(Mount* mnt, MountNode* node, int mode)
16 : mount_(mnt), 15 : mount_(mnt),
17 node_(node), 16 node_(node),
18 mode_(mode), 17 mode_(mode),
19 offs_(0) { 18 offs_(0) {
20 if (mode & O_APPEND) offs_ = node->GetSize(); 19 if (mode & O_APPEND) offs_ = node->GetSize();
21 } 20 }
22
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698