(index, num, workers, msg)
| 215 | } |
| 216 | |
| 217 | let jsWakeCheck = function(index, num, workers, msg) { |
| 218 | waitForAllWorkers(index); |
| 219 | let indexJs = index / 4; |
| 220 | if (num >= numWorkers) { |
| 221 | // If numWorkers or more is passed to wake, numWorkers workers should be |
| 222 | // woken. |
| 223 | assertEquals(numWorkers, Atomics.notify(i32a, indexJs, num)); |
| 224 | } else { |
| 225 | // If num < numWorkers is passed to wake, num workers should be woken. |
| 226 | // Then the remaining workers are woken for the next part. |
| 227 | assertEquals(num, Atomics.notify(i32a, indexJs, num)); |
| 228 | assertEquals(numWorkers-num, Atomics.notify(i32a, indexJs, numWorkers)); |
| 229 | } |
| 230 | for (let id = 0; id < numWorkers; id++) { |
| 231 | assertEquals(msg, workers[id].getMessage()); |
| 232 | } |
| 233 | }; |
| 234 | |
| 235 | let wasmWakeCheck = function(offset, index, num, workers, msg) { |
| 236 | waitForAllWorkers(offset + index); |
no test coverage detected