source: CIVL/examples/concurrency/locksGood.cvl@ 4f22a92

1.23 2.0 main test-branch
Last change on this file since 4f22a92 was 8b354468, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

fix indention of atomic block

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

  • Property mode set to 100644
File size: 380 bytes
Line 
1
2_Bool lock0 = 0;
3_Bool lock1 = 0;
4
5void proc0() {
6 $atomic {
7 while (1) {
8 $when (!lock0) lock0=1;
9 $when (!lock1) lock1=1;
10 lock0=0;
11 lock1=0;
12 }
13 }
14}
15
16void proc1() {
17 $atomic {
18 while (1) {
19 $when (!lock0) lock0=1;
20 $when (!lock1) lock1=1;
21 lock0=0;
22 lock1=0;
23 }
24 }
25}
26
27void main() {
28 $spawn proc0();
29 $spawn proc1();
30}
Note: See TracBrowser for help on using the repository browser.