source: CIVL/mods/dev.civl.com/examples/concurrency/civl172miss.cvl@ cb4d4f4

1.23 2.0 main test-branch
Last change on this file since cb4d4f4 was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

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

  • Property mode set to 100644
File size: 361 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(pid != 0 || y != 3);
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.