source: tests/concurrency/cluster.cfa @ 6a6e205

Last change on this file since 6a6e205 was 10b5970, checked in by Michael Brooks <mlbrooks@…>, 13 days ago

Fix many test-suite- and libcfa-caused unused variable warnings.

In scope are easy fixes among tests whose sole warnings were unused variable. Reduces the wflags lax list by 40%.

  • Property mode set to 100644
File size: 471 bytes
Line 
1#include <kernel.hfa>
2#include <thread.hfa>
3
4static cluster * the_cluster;
5
6thread MyThread {};
7void ?{}( MyThread & this ) {
8        ((thread&)this){ *the_cluster };
9}
10
11void main( MyThread & ) {
12        for(50) {
13                yield();
14        }
15}
16
17struct MyProc {
18        processor self;
19};
20
21void ?{}( MyProc & this ) {
22        (this.self){ *the_cluster };
23}
24
25int main() {
26        cluster cl;
27        the_cluster = &cl;
28        {
29                MyProc procs[4];
30                {
31                        MyThread threads[17];
32                }
33        }
34        printf( "done\n" );                             // non-empty .expect file
35}
Note: See TracBrowser for help on using the repository browser.