ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        with_gc
      
      
        
          | 
            Last change
 on this file since cc2eda7 was             17af7d1, checked in by Thierry Delisle <tdelisle@…>, 9 years ago           | 
        
        
          | 
             
Some clean-up of runtime code 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            381 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #include <kernel>
 | 
|---|
| 2 | #include <thread>
 | 
|---|
| 3 | 
 | 
|---|
| 4 | struct MyThread { thread_desc __thrd; };
 | 
|---|
| 5 | 
 | 
|---|
| 6 | DECL_THREAD(MyThread);
 | 
|---|
| 7 | 
 | 
|---|
| 8 | void ?{}( MyThread * this ) {}
 | 
|---|
| 9 | 
 | 
|---|
| 10 | void main( MyThread* this ) {
 | 
|---|
| 11 |         for(int i = 0; i < 1000000; i++) {
 | 
|---|
| 12 |                 yield();
 | 
|---|
| 13 |         }
 | 
|---|
| 14 | }
 | 
|---|
| 15 | 
 | 
|---|
| 16 | int main(int argc, char* argv[]) {
 | 
|---|
| 17 |         // sout | "User main begin" | endl;
 | 
|---|
| 18 |         {
 | 
|---|
| 19 |                 processor p;
 | 
|---|
| 20 |                 {
 | 
|---|
| 21 |                         scoped(MyThread) f[4];
 | 
|---|
| 22 |                 }
 | 
|---|
| 23 |         }
 | 
|---|
| 24 |         // sout | "User main end" | endl;
 | 
|---|
| 25 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.