source: CIVL/examples/assertFirst.cvl@ 475b2d9

1.23 2.0 main test-branch
Last change on this file since 475b2d9 was 72620cf, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

Added test of assert first.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@98 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 285 bytes
Line 
1#include <civlc.h>
2int N = 5; /* number of threads */
3$proc threads[N]; // the threads
4
5void run(int tid) {
6 $assert 0==1; // why isn't this run?
7 while (1==1) {
8 }
9}
10
11void 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.