| 1 |
{ |
| 2 |
"source_filename": "tests/cli/upstream-threads/MP_atomic.wast", |
| 3 |
"commands": [ |
| 4 |
{ |
| 5 |
"type": "module", |
| 6 |
"line": 3, |
| 7 |
"name": "Mem", |
| 8 |
"filename": "MP_atomic.0.wasm", |
| 9 |
"module_type": "binary" |
| 10 |
}, |
| 11 |
{ |
| 12 |
"type": "thread", |
| 13 |
"line": 7, |
| 14 |
"name": "T1", |
| 15 |
"shared_module": "Mem", |
| 16 |
"commands": [ |
| 17 |
{ |
| 18 |
"type": "register", |
| 19 |
"line": 8, |
| 20 |
"name": "Mem", |
| 21 |
"as": "mem" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"type": "module", |
| 25 |
"line": 9, |
| 26 |
"filename": "MP_atomic.1.wasm", |
| 27 |
"module_type": "binary" |
| 28 |
}, |
| 29 |
{ |
| 30 |
"type": "action", |
| 31 |
"line": 16, |
| 32 |
"action": { |
| 33 |
"type": "invoke", |
| 34 |
"field": "run", |
| 35 |
"args": [] |
| 36 |
} |
| 37 |
} |
| 38 |
] |
| 39 |
}, |
| 40 |
{ |
| 41 |
"type": "thread", |
| 42 |
"line": 19, |
| 43 |
"name": "T2", |
| 44 |
"shared_module": "Mem", |
| 45 |
"commands": [ |
| 46 |
{ |
| 47 |
"type": "register", |
| 48 |
"line": 20, |
| 49 |
"name": "Mem", |
| 50 |
"as": "mem" |
| 51 |
}, |
| 52 |
{ |
| 53 |
"type": "module", |
| 54 |
"line": 21, |
| 55 |
"filename": "MP_atomic.2.wasm", |
| 56 |
"module_type": "binary" |
| 57 |
}, |
| 58 |
{ |
| 59 |
"type": "action", |
| 60 |
"line": 36, |
| 61 |
"action": { |
| 62 |
"type": "invoke", |
| 63 |
"field": "run", |
| 64 |
"args": [] |
| 65 |
} |
| 66 |
} |
| 67 |
] |
| 68 |
}, |
| 69 |
{ |
| 70 |
"type": "wait", |
| 71 |
"line": 39, |
| 72 |
"thread": "T1" |
| 73 |
}, |
| 74 |
{ |
| 75 |
"type": "wait", |
| 76 |
"line": 40, |
| 77 |
"thread": "T2" |
| 78 |
}, |
| 79 |
{ |
| 80 |
"type": "module", |
| 81 |
"line": 42, |
| 82 |
"name": "Check", |
| 83 |
"filename": "MP_atomic.3.wasm", |
| 84 |
"module_type": "binary" |
| 85 |
}, |
| 86 |
{ |
| 87 |
"type": "assert_return", |
| 88 |
"line": 63, |
| 89 |
"action": { |
| 90 |
"type": "invoke", |
| 91 |
"module": "Check", |
| 92 |
"field": "check", |
| 93 |
"args": [] |
| 94 |
}, |
| 95 |
"expected": [ |
| 96 |
{ |
| 97 |
"type": "i32", |
| 98 |
"value": "1" |
| 99 |
} |
| 100 |
] |
| 101 |
} |
| 102 |
] |
| 103 |
} |