| 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_IO_KERNEL_OBJECT_H_ | 5 #ifndef LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ |
| 6 #define LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ | 6 #define LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ |
| 7 | 7 |
| 8 #include <pthread.h> | 8 #include <pthread.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "nacl_io/error.h" | 14 #include "nacl_io/error.h" |
| 15 #include "nacl_io/kernel_handle.h" | 15 #include "nacl_io/kernel_handle.h" |
| 16 #include "nacl_io/mount.h" | 16 #include "nacl_io/mount.h" |
| 17 #include "nacl_io/mount_node.h" | 17 #include "nacl_io/mount_node.h" |
| 18 #include "nacl_io/path.h" | 18 #include "nacl_io/path.h" |
| 19 | 19 |
| 20 #include "sdk_util/macros.h" |
| 20 #include "sdk_util/simple_lock.h" | 21 #include "sdk_util/simple_lock.h" |
| 21 | 22 |
| 22 namespace nacl_io { | 23 namespace nacl_io { |
| 23 | 24 |
| 24 // KernelObject provides basic functionality for threadsafe access to kernel | 25 // KernelObject provides basic functionality for threadsafe access to kernel |
| 25 // objects such as the CWD, mount points, file descriptors and file handles. | 26 // objects such as the CWD, mount points, file descriptors and file handles. |
| 26 // All Kernel locks are private to ensure the lock order. | 27 // All Kernel locks are private to ensure the lock order. |
| 27 // | 28 // |
| 28 // All calls are assumed to be a relative path. | 29 // All calls are assumed to be a relative path. |
| 29 class KernelObject { | 30 class KernelObject { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 90 |
| 90 // Lock to protect cwd_. | 91 // Lock to protect cwd_. |
| 91 sdk_util::SimpleLock cwd_lock_; | 92 sdk_util::SimpleLock cwd_lock_; |
| 92 | 93 |
| 93 DISALLOW_COPY_AND_ASSIGN(KernelObject); | 94 DISALLOW_COPY_AND_ASSIGN(KernelObject); |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace nacl_io | 97 } // namespace nacl_io |
| 97 | 98 |
| 98 #endif // LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ | 99 #endif // LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ |
| OLD | NEW |