source: CIVL/examples/pthread/test.cvl@ f6ce0eb

1.23 2.0 main test-branch
Last change on this file since f6ce0eb was 38374b7, checked in by John Edenhofner <johneden@…>, 12 years ago

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

  • Property mode set to 100644
File size: 326 bytes
RevLine 
[38374b7]1#include <civlc.h>
2#include <stdio.h>
3#include <assert.h>
4
5
6
7void *t1()
8{
9 while(1){
10 printf("stuff");
11 }
12}
13
14int main(void)
15{
16 $proc id1, id2;
17
18 id1 = $spawn t1();
19 id2 = $spawn t1();
20 if($proc_defined(id1) && $proc_defined(id2)) {
21 if(id1 == id2){
22 printf("blah");
23 }
24 }
25 $wait(id1);
26 $wait(id2);
27}
Note: See TracBrowser for help on using the repository browser.