source:
CIVL/examples/fairness/unfair3.cvl
| Last change on this file was 19b94fb, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 193 bytes | |
| Rev | Line | |
|---|---|---|
| [19b94fb] | 1 | /* All fair executions terminate. */ |
| 2 | #include <stdio.h> | |
| 3 | ||
| 4 | int x=0; | |
| 5 | ||
| 6 | void f() { | |
| 7 | while (x==0) { | |
| 8 | $atomic{ printf("Hi\n"); } | |
| 9 | } | |
| 10 | } | |
| 11 | ||
| 12 | int main() { | |
| 13 | $proc p1 = $spawn f(); | |
| 14 | x=1; | |
| 15 | $wait(p1); | |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
