ADT
        ast-experimental
        pthread-emulation
        qualifiedEnum
      
      
        
          | 
            Last change
 on this file since 5a96b36 was             66812dd, checked in by Peter A. Buhr <pabuhr@…>, 5 years ago           | 
        
        
          | 
             
convert tests to always print output (no empty .expect files) 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            476 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #include <kernel.hfa>
 | 
|---|
| 2 | #include <thread.hfa>
 | 
|---|
| 3 | 
 | 
|---|
| 4 | static cluster * the_cluster;
 | 
|---|
| 5 | 
 | 
|---|
| 6 | thread MyThread {};
 | 
|---|
| 7 | void ?{}( MyThread & this ) {
 | 
|---|
| 8 |         ((thread&)this){ *the_cluster };
 | 
|---|
| 9 | }
 | 
|---|
| 10 | 
 | 
|---|
| 11 | void main( MyThread & this ) {
 | 
|---|
| 12 |         for(50) {
 | 
|---|
| 13 |                 yield();
 | 
|---|
| 14 |         }
 | 
|---|
| 15 | }
 | 
|---|
| 16 | 
 | 
|---|
| 17 | struct MyProc {
 | 
|---|
| 18 |         processor self;
 | 
|---|
| 19 | };
 | 
|---|
| 20 | 
 | 
|---|
| 21 | void ?{}( MyProc & this ) {
 | 
|---|
| 22 |         (this.self){ *the_cluster };
 | 
|---|
| 23 | }
 | 
|---|
| 24 | 
 | 
|---|
| 25 | int 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.