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

Unified Diff: src/wasm/wasm-module.h

Issue 2080223006: [wasm] Move the semaphore for parallel compilation to the wasm module. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adjusted a comment. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/platform/semaphore.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index 180f5bcde39f000fa0c9169eee1c0a0eea52ba4c..3329b69b5c1c742bd4d096b9f0563c6e0d316109 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -178,6 +178,14 @@ struct WasmModule {
std::vector<uint16_t> function_table; // function table.
std::vector<WasmImport> import_table; // import table.
std::vector<WasmExport> export_table; // export table.
+ // We store the semaphore here to extend its lifetime. In <libc-2.21, which we
+ // use on the try bots, semaphore::Wait() can return while some compilation
+ // tasks are still executing semaphore::Signal(). If the semaphore is cleaned
+ // up right after semaphore::Wait() returns, then this can cause an
+ // invalid-semaphore error in the compilation tasks.
+ // TODO(wasm): Move this semaphore back to CompileInParallel when the try bots
+ // switch to libc-2.21 or higher.
+ base::SmartPointer<base::Semaphore> pending_tasks;
WasmModule();
« no previous file with comments | « src/base/platform/semaphore.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698