source: CIVL/examples/languageFeatures/yieldTest/local_no_yield.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

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

  • Property mode set to 100644
File size: 396 bytes
RevLine 
[87e98a4]1/* Threads t0 and t1 are all wrapped in $local_begin and $local_end.
2 Without $yield, only one interleave: t0 first then t1 will be
3 explored by CIVL. Hence the assertion violation will not be found
4 (intended) by CIVL.
5 */
6
7int x = -1;
8
9void thread(int tid) {
10 $local_start();
11 x = tid;
12 $local_end();
13}
14
15int main() {
16 $parfor (int i : 0 .. 1)
17 thread(i);
18 $assert(x == 1);
19}
Note: See TracBrowser for help on using the repository browser.