source:
CIVL/examples/assertFirst.cvl@
9179b4f
| Last change on this file since 9179b4f was 72620cf, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 285 bytes | |
| Line | |
|---|---|
| 1 | #include <civlc.h> |
| 2 | int N = 5; /* number of threads */ |
| 3 | $proc threads[N]; // the threads |
| 4 | |
| 5 | void run(int tid) { |
| 6 | $assert 0==1; // why isn't this run? |
| 7 | while (1==1) { |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | void main() { |
| 12 | for (int i=0; i<N; i++) threads[i] = $spawn run(i); |
| 13 | for (int i=0; i<N; i++) $wait threads[i]; |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
