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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_object.cc

Issue 16325024: Move thread_pool.h into utils so it can be shared by more than one example. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_intercept.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698