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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h

Issue 308013002: Pepper: Narrow locking at llc subprocess start. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for bbudge Created 6 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
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.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 // 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 NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_TRANSLATE_THREAD_H_ 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_TRANSLATE_THREAD_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_TRANSLATE_THREAD_H_ 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_TRANSLATE_THREAD_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 nacl::scoped_ptr<NaClThread> translate_thread_; 85 nacl::scoped_ptr<NaClThread> translate_thread_;
86 86
87 // Used to guard llc_subprocess and ld_subprocess 87 // Used to guard llc_subprocess and ld_subprocess
88 struct NaClMutex subprocess_mu_; 88 struct NaClMutex subprocess_mu_;
89 nacl::scoped_ptr<NaClSubprocess> llc_subprocess_; 89 nacl::scoped_ptr<NaClSubprocess> llc_subprocess_;
90 nacl::scoped_ptr<NaClSubprocess> ld_subprocess_; 90 nacl::scoped_ptr<NaClSubprocess> ld_subprocess_;
91 // Used to ensure the subprocesses don't get shutdown more than once. 91 // Used to ensure the subprocesses don't get shutdown more than once.
92 bool llc_subprocess_active_; 92 bool llc_subprocess_active_;
93 bool ld_subprocess_active_; 93 bool ld_subprocess_active_;
94 94
95 bool subprocesses_aborted_;
96
95 // Condition variable to synchronize communication with the SRPC thread. 97 // Condition variable to synchronize communication with the SRPC thread.
96 // SRPC thread waits on this condvar if data_buffers_ is empty (meaning 98 // SRPC thread waits on this condvar if data_buffers_ is empty (meaning
97 // there is no bitcode to send to the translator), and the main thread 99 // there is no bitcode to send to the translator), and the main thread
98 // appends to data_buffers_ and signals it when it receives bitcode. 100 // appends to data_buffers_ and signals it when it receives bitcode.
99 struct NaClCondVar buffer_cond_; 101 struct NaClCondVar buffer_cond_;
100 // Mutex for buffer_cond_. 102 // Mutex for buffer_cond_.
101 struct NaClMutex cond_mu_; 103 struct NaClMutex cond_mu_;
102 // Data buffers from FileDownloader are enqueued here to pass from the 104 // Data buffers from FileDownloader are enqueued here to pass from the
103 // main thread to the SRPC thread. Protected by cond_mu_ 105 // main thread to the SRPC thread. Protected by cond_mu_
104 std::deque<std::vector<char> > data_buffers_; 106 std::deque<std::vector<char> > data_buffers_;
(...skipping 12 matching lines...) Expand all
117 PP_PNaClOptions* pnacl_options_; 119 PP_PNaClOptions* pnacl_options_;
118 nacl::string architecture_attributes_; 120 nacl::string architecture_attributes_;
119 PnaclCoordinator* coordinator_; 121 PnaclCoordinator* coordinator_;
120 Plugin* plugin_; 122 Plugin* plugin_;
121 private: 123 private:
122 NACL_DISALLOW_COPY_AND_ASSIGN(PnaclTranslateThread); 124 NACL_DISALLOW_COPY_AND_ASSIGN(PnaclTranslateThread);
123 }; 125 };
124 126
125 } 127 }
126 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_TRANSLATE_THREAD_H_ 128 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_TRANSLATE_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698