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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_proxy.h

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem 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 #ifndef LIBRARIES_NACL_IO_KERNEL_PROXY_H_ 5 #ifndef LIBRARIES_NACL_IO_KERNEL_PROXY_H_
6 #define LIBRARIES_NACL_IO_KERNEL_PROXY_H_ 6 #define LIBRARIES_NACL_IO_KERNEL_PROXY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "nacl_io/kernel_object.h" 11 #include "nacl_io/kernel_object.h"
12 #include "nacl_io/mount_factory.h" 12 #include "nacl_io/mount_factory.h"
13 #include "nacl_io/ostypes.h" 13 #include "nacl_io/ostypes.h"
14 #include "nacl_io/osutime.h" 14 #include "nacl_io/osutime.h"
15 15
16 namespace nacl_io {
17
16 class PepperInterface; 18 class PepperInterface;
17 19
18 // KernelProxy provide one-to-one mapping for libc kernel calls. Calls to the 20 // KernelProxy provide one-to-one mapping for libc kernel calls. Calls to the
19 // proxy will result in IO access to the provided Mount and MountNode objects. 21 // proxy will result in IO access to the provided Mount and MountNode objects.
20 // 22 //
21 // NOTE: The KernelProxy does not directly take any kernel locks, all locking 23 // NOTE: The KernelProxy does not directly take any kernel locks, all locking
22 // is done by the parent class KernelObject. Instead, KernelProxy is 24 // is done by the parent class KernelObject. Instead, KernelProxy is
23 // responsible for taking the locks of the KernelHandle, and MountNode objects. 25 // responsible for taking the locks of the KernelHandle, and MountNode objects.
24 // For this reason, a KernelObject call should not be done while holding 26 // For this reason, a KernelObject call should not be done while holding
25 // a handle or node lock. In addition, to ensure locking order, 27 // a handle or node lock. In addition, to ensure locking order,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 protected: 119 protected:
118 MountFactoryMap_t factories_; 120 MountFactoryMap_t factories_;
119 121
120 int dev_; 122 int dev_;
121 PepperInterface* ppapi_; 123 PepperInterface* ppapi_;
122 static KernelProxy *s_instance_; 124 static KernelProxy *s_instance_;
123 125
124 DISALLOW_COPY_AND_ASSIGN(KernelProxy); 126 DISALLOW_COPY_AND_ASSIGN(KernelProxy);
125 }; 127 };
126 128
129 } // namespace nacl_io
130
127 #endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_ 131 #endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_object.cc ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698