source:
CIVL/examples/assertFirst.cvl@
d6665ab
| Last change on this file since d6665ab was 72620cf, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 285 bytes | |
| Rev | Line | |
|---|---|---|
| [72620cf] | 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.
