source: CIVL/examples/concurrency/locksBad.cvl@ bfebb46

1.23 2.0 main test-branch
Last change on this file since bfebb46 was 9fb69d3, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

cleaned up examples/tests in concurrency folder.

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

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