| 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> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // path relative to the filesystem. | 55 // path relative to the filesystem. |
| 56 // Assumes |out_fs| and |rel_path| are non-NULL. | 56 // Assumes |out_fs| and |rel_path| are non-NULL. |
| 57 Error AcquireFsAndRelPath(const std::string& path, | 57 Error AcquireFsAndRelPath(const std::string& path, |
| 58 ScopedFilesystem* out_fs, | 58 ScopedFilesystem* out_fs, |
| 59 Path* rel_path); | 59 Path* rel_path); |
| 60 | 60 |
| 61 // Find the filesystem and node for the given path, acquiring/creating it as | 61 // Find the filesystem and node for the given path, acquiring/creating it as |
| 62 // specified by the |oflags|. | 62 // specified by the |oflags|. |
| 63 // Assumes |out_fs| and |out_node| are non-NULL. | 63 // Assumes |out_fs| and |out_node| are non-NULL. |
| 64 Error AcquireFsAndNode(const std::string& path, | 64 Error AcquireFsAndNode(const std::string& path, |
| 65 int oflags, | 65 int oflags, mode_t mflags, |
| 66 ScopedFilesystem* out_fs, | 66 ScopedFilesystem* out_fs, |
| 67 ScopedNode* out_node); | 67 ScopedNode* out_node); |
| 68 | 68 |
| 69 // Get FD-specific flags (currently only FD_CLOEXEC is supported). | 69 // Get FD-specific flags (currently only FD_CLOEXEC is supported). |
| 70 Error GetFDFlags(int fd, int* out_flags); | 70 Error GetFDFlags(int fd, int* out_flags); |
| 71 // Set FD-specific flags (currently only FD_CLOEXEC is supported). | 71 // Set FD-specific flags (currently only FD_CLOEXEC is supported). |
| 72 Error SetFDFlags(int fd, int flags); | 72 Error SetFDFlags(int fd, int flags); |
| 73 | 73 |
| 74 // Convert from FD to KernelHandle, and acquire the handle. | 74 // Convert from FD to KernelHandle, and acquire the handle. |
| 75 // Assumes |out_handle| is non-NULL. | 75 // Assumes |out_handle| is non-NULL. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 // Lock to protect cwd_. | 112 // Lock to protect cwd_. |
| 113 sdk_util::SimpleLock cwd_lock_; | 113 sdk_util::SimpleLock cwd_lock_; |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(KernelObject); | 115 DISALLOW_COPY_AND_ASSIGN(KernelObject); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 } // namespace nacl_io | 118 } // namespace nacl_io |
| 119 | 119 |
| 120 #endif // LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ | 120 #endif // LIBRARIES_NACL_IO_KERNEL_OBJECT_H_ |
| OLD | NEW |