source: CIVL/examples/concurrency/civl174miss.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

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

  • Property mode set to 100644
File size: 351 bytes
Line 
1#include<civlc.cvh>
2$input int N=3;
3int y = 0;
4
5int proc(int pid) {
6 L1: y = $choose_int(2);
7 $atomic{
8 y++;
9 $assert(y!=N+1);
10 }
11 goto L1;
12 return 0;
13}
14
15int main() {
16 $proc procs[N];
17
18 $atomic{
19 for (int i = 0; i < N; i++)
20 procs[i] = $spawn proc(i);
21 }
22 for (int i = 0; i < N; i++)
23 $wait(procs[i]);
24 return 0;
25}
Note: See TracBrowser for help on using the repository browser.