source:
CIVL/examples/library/civlc/exit.cvl@
d87ec9c
| Last change on this file since d87ec9c was a0f0868, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 343 bytes | |
| Line | |
|---|---|
| 1 | /* Commandline execution: |
| 2 | * civl verify exit.cvl |
| 3 | * */ |
| 4 | #include<civlc.h> |
| 5 | |
| 6 | void f() { |
| 7 | for (int i = 0; i < 10; i++) { |
| 8 | if (i == 8) { |
| 9 | $exit(); |
| 10 | } |
| 11 | $assert(i < 9); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | void main() { |
| 16 | $proc procs[4]; |
| 17 | |
| 18 | for (int i = 0; i < 4; i++) { |
| 19 | procs[i] = $spawn f(); |
| 20 | } |
| 21 | for (int i = 0; i < 4; i++) { |
| 22 | $wait(procs[i]); |
| 23 | } |
| 24 | } |
Note:
See TracBrowser
for help on using the repository browser.
