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_io/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_io/kernel_handle.h" | 17 #include "nacl_io/kernel_handle.h" |
18 #include "nacl_io/mount.h" | 18 #include "nacl_io/mount.h" |
19 #include "nacl_io/mount_node.h" | 19 #include "nacl_io/mount_node.h" |
20 #include "utils/auto_lock.h" | 20 #include "sdk_util/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_); |
30 } | 30 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 Path abs_path(cwd_); | 174 Path abs_path(cwd_); |
175 if (path[0] == '/') { | 175 if (path[0] == '/') { |
176 abs_path = path; | 176 abs_path = path; |
177 } else { | 177 } else { |
178 abs_path = cwd_; | 178 abs_path = cwd_; |
179 abs_path.Append(path); | 179 abs_path.Append(path); |
180 } | 180 } |
181 | 181 |
182 return abs_path; | 182 return abs_path; |
183 } | 183 } |
OLD | NEW |