source: CIVL/examples/contracts/with.cvl@ 8b2639d

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 8b2639d was 15a2fae, checked in by Manchun Zheng <zmanchun@…>, 10 years ago

fixed a bug in the implementation of $with

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

  • Property mode set to 100644
File size: 399 bytes
Line 
1#include<collate.cvh>
2
3$input int N=2;
4
5$gcollator gcollator=$gcollator_create($here, N);
6
7void process(int id){
8 $collator collator=$collator_create(gcollator, $here, id);
9 $collate_state cs=$collate_arrives(collator, $here);
10
11 $with (cs) {
12 $assert($true);
13 }
14 $collate_departs(collator);
15 $free(collator);
16}
17
18
19int main(){
20 $parfor(int i: 0 .. N-1)
21 process(i);
22 $free(gcollator);
23}
Note: See TracBrowser for help on using the repository browser.