OLD | NEW |
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_MOUNTS_KERNEL_HANDLE_H_ | 5 #ifndef LIBRARIES_NACL_IO_KERNEL_HANDLE_H_ |
6 #define LIBRARIES_NACL_MOUNTS_KERNEL_HANDLE_H_ | 6 #define LIBRARIES_NACL_IO_KERNEL_HANDLE_H_ |
7 | 7 |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 | 9 |
10 #include "nacl_mounts/ostypes.h" | 10 #include "nacl_io/ostypes.h" |
11 #include "utils/macros.h" | 11 #include "utils/macros.h" |
12 #include "utils/ref_object.h" | 12 #include "utils/ref_object.h" |
13 | 13 |
14 class Mount; | 14 class Mount; |
15 class MountNode; | 15 class MountNode; |
16 | 16 |
17 // KernelHandle provides a reference counted container for the open | 17 // KernelHandle provides a reference counted container for the open |
18 // file information, such as it's mount, node, access type and offset. | 18 // file information, such as it's mount, node, access type and offset. |
19 // KernelHandle can only be referenced when the KernelProxy lock is held. | 19 // KernelHandle can only be referenced when the KernelProxy lock is held. |
20 class KernelHandle : public RefObject { | 20 class KernelHandle : public RefObject { |
(...skipping 10 matching lines...) Expand all Loading... |
31 private: | 31 private: |
32 // May only be called by the KernelProxy when the Kernel's | 32 // May only be called by the KernelProxy when the Kernel's |
33 // lock is held. | 33 // lock is held. |
34 friend class KernelObject; | 34 friend class KernelObject; |
35 friend class KernelProxy; | 35 friend class KernelProxy; |
36 void Acquire() { RefObject::Acquire(); } | 36 void Acquire() { RefObject::Acquire(); } |
37 bool Release() { return RefObject::Release(); } | 37 bool Release() { return RefObject::Release(); } |
38 DISALLOW_COPY_AND_ASSIGN(KernelHandle); | 38 DISALLOW_COPY_AND_ASSIGN(KernelHandle); |
39 }; | 39 }; |
40 | 40 |
41 #endif // LIBRARIES_NACL_MOUNTS_KERNEL_HANDLE_H_ | 41 #endif // LIBRARIES_NACL_IO_KERNEL_HANDLE_H_ |
OLD | NEW |