MCPcopy Create free account
hub / github.com/nodejs/node / wasmWakeCheck

Function wasmWakeCheck

deps/v8/test/mjsunit/wasm/atomics-memory64.js:235–247  ·  view source on GitHub ↗
(offset, index, num, workers, msg)

Source from the content-addressed store, hash-verified

233 };
234
235 let wasmWakeCheck = function(offset, index, num, workers, msg) {
236 waitForAllWorkers(offset + index);
237 if (num >= numWorkers) {
238 assertEquals(numWorkers, WasmAtomicNotify(memory, offset, index, num));
239 } else {
240 assertEquals(num, WasmAtomicNotify(memory, offset, index, num));
241 assertEquals(numWorkers-num,
242 WasmAtomicNotify(memory, offset, index, numWorkers));
243 }
244 for (let id = 0; id < numWorkers; id++) {
245 assertEquals(msg, workers[id].getMessage());
246 }
247 };
248
249 let workers = [];
250 for (let id = 0; id < numWorkers; id++) {

Callers 1

TestWasmAtomicsInWorkersFunction · 0.70

Calls 3

waitForAllWorkersFunction · 0.70
WasmAtomicNotifyFunction · 0.70
assertEqualsFunction · 0.50

Tested by

no test coverage detected