source:
CIVL/examples/por/atomic1.cvl@
50f834b
| Last change on this file since 50f834b was b15374a, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 121 bytes | |
| Rev | Line | |
|---|---|---|
| [b15374a] | 1 | #include<civlc.h> |
| 2 | int x=0; | |
| 3 | void f() { | |
| 4 | x=1; | |
| 5 | } | |
| 6 | void main() { | |
| 7 | $spawn f(); | |
| 8 | $atomic { | |
| 9 | $assert(x==1); // false | |
| 10 | } | |
| 11 | } |
Note:
See TracBrowser
for help on using the repository browser.
