source:
CIVL/examples/concurrency/pointerShare.cvl@
32410ee
| Last change on this file since 32410ee was a9b67d28, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 160 bytes | |
| Rev | Line | |
|---|---|---|
| [a9b67d28] | 1 | #include<civlc.h> |
| 2 | int x; | |
| 3 | int *p = &x; | |
| 4 | ||
| 5 | void f() { | |
| 6 | int y=0; | |
| 7 | { | |
| 8 | int *q = p; | |
| 9 | *q = 15; | |
| 10 | } | |
| 11 | } | |
| 12 | ||
| 13 | void main() { | |
| 14 | $spawn f(); | |
| 15 | *p = 5; | |
| 16 | $assert(*p==5); | |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
