source: CIVL/examples/por/fib.cvl@ c84ae6e2

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since c84ae6e2 was 237da6c, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

added fib programs for investigations

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

  • Property mode set to 100644
File size: 326 bytes
Line 
1#include<civlc.cvh>
2#include<stdio.h>
3
4$input int N=3;
5
6int i=1,j=1;
7void proc0(){
8 for(int k=0; k<N; k++)
9 i+=j;
10}
11
12void proc1(){
13 for(int k=0; k<N; k++)
14 j+=i;
15}
16
17int main(){
18 $proc p0, p1;
19
20 $atomic{
21 p0=$spawn proc0();
22 p1=$spawn proc1();
23 }
24 $wait(p0);
25 $wait(p1);
26 //printf("x=%d, y=%d\n", x, y);
27}
28
Note: See TracBrowser for help on using the repository browser.