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 #include "nacl_mounts/kernel_object.h" | 5 #include "nacl_io/kernel_object.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <pthread.h> | 10 #include <pthread.h> |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <map> | 13 #include <map> |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "nacl_mounts/kernel_handle.h" | 17 #include "nacl_io/kernel_handle.h" |
18 #include "nacl_mounts/mount.h" | 18 #include "nacl_io/mount.h" |
19 #include "nacl_mounts/mount_node.h" | 19 #include "nacl_io/mount_node.h" |
20 #include "utils/auto_lock.h" | 20 #include "utils/auto_lock.h" |
21 | 21 |
22 KernelObject::KernelObject() { | 22 KernelObject::KernelObject() { |
23 pthread_mutex_init(&kernel_lock_, NULL); | 23 pthread_mutex_init(&kernel_lock_, NULL); |
24 pthread_mutex_init(&process_lock_, NULL); | 24 pthread_mutex_init(&process_lock_, NULL); |
25 } | 25 } |
26 | 26 |
27 KernelObject::~KernelObject() { | 27 KernelObject::~KernelObject() { |
28 pthread_mutex_destroy(&process_lock_); | 28 pthread_mutex_destroy(&process_lock_); |
29 pthread_mutex_destroy(&kernel_lock_); | 29 pthread_mutex_destroy(&kernel_lock_); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 Path abs_path(cwd_); | 163 Path abs_path(cwd_); |
164 if (path[0] == '/') { | 164 if (path[0] == '/') { |
165 abs_path = path; | 165 abs_path = path; |
166 } else { | 166 } else { |
167 abs_path = cwd_; | 167 abs_path = cwd_; |
168 abs_path.Append(path); | 168 abs_path.Append(path); |
169 } | 169 } |
170 | 170 |
171 return abs_path; | 171 return abs_path; |
172 } | 172 } |
OLD | NEW |