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

Side by Side Diff: libraries/nacl-mounts/base/KernelProxy.h

Issue 10832154: Fix dup and dup2 in nacl-mounts (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: 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
« no previous file with comments | « libraries/nacl-mounts/base/Entry.cc ('k') | libraries/nacl-mounts/base/KernelProxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 #ifndef PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_KERNELPROXY_H_ 6 #ifndef PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_KERNELPROXY_H_
7 #define PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_KERNELPROXY_H_ 7 #define PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_KERNELPROXY_H_
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 struct FileHandle { 151 struct FileHandle {
152 Mount *mount; 152 Mount *mount;
153 Socket* stream; 153 Socket* stream;
154 ino_t node; 154 ino_t node;
155 off_t offset; 155 off_t offset;
156 int flags; 156 int flags;
157 int use_count; 157 int use_count;
158 pthread_mutex_t lock; 158 pthread_mutex_t lock;
159 }; 159 };
160 FileHandle* GetFileHandle(int fd); 160 FileHandle* GetFileHandle(int fd);
161 int Close(int fd);
161 162
162 BaseSocketSubSystem* socket_subsystem_; 163 BaseSocketSubSystem* socket_subsystem_;
163 Path cwd_; 164 Path cwd_;
164 int max_path_len_; 165 int max_path_len_;
165 MountManager mm_; 166 MountManager mm_;
166 pthread_mutex_t kp_lock_; 167 pthread_mutex_t kp_lock_;
167 static KernelProxy *kp_instance_; 168 static KernelProxy *kp_instance_;
168 169
169 SlotAllocator<FileDescriptor> fds_; 170 SlotAllocator<FileDescriptor> fds_;
170 SlotAllocator<FileHandle> open_files_; 171 SlotAllocator<FileHandle> open_files_;
171 172
172 int OpenHandle(Mount *mount, const std::string& path, int oflag, mode_t mode); 173 int OpenHandle(Mount *mount, const std::string& path, int oflag, mode_t mode);
173 174
174 KernelProxy(); 175 KernelProxy();
175 static void Instantiate(); 176 static void Instantiate();
176 }; 177 };
177 178
178 #endif // PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_KERNELPROXY_H_ 179 #endif // PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_KERNELPROXY_H_
OLDNEW
« no previous file with comments | « libraries/nacl-mounts/base/Entry.cc ('k') | libraries/nacl-mounts/base/KernelProxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698