source: CIVL/examples/fairness/fair4.cvl

main
Last change on this file was 1cface7, checked in by Stephen Siegel <siegel@…>, 3 years ago

Added new -fair feature which will ignore unfair cycles during cycle detection. Added some JUnit tests.

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

  • Property mode set to 100644
File size: 299 bytes
RevLine 
[1cface7]1/* This program has a non-terminating fair execution */
2#include <stdio.h>
3
4int l1=0;
5
6void f() {
7 while (1) {
8 $when (l1==0) l1=1;
9 printf("bye\n");
10 l1=0;
11 }
12}
13
14int main() {
15 $proc p1 = $spawn f();
16 while (1) {
17 $when (l1==0) l1=1;
18 printf("hi\n");
19 l1=0;
20 }
21 $wait(p1);
22}
Note: See TracBrowser for help on using the repository browser.