Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/thread.c

    rbd4d011 rcb0e6de  
    44#include <thread>
    55
    6 // thread First;
    7 // void main(First* this);
     6struct First { thread_desc __thrd; signal_once* lock; };
     7struct Second { thread_desc __thrd; signal_once* lock; };
    88
    9 // thread Second;
    10 // void main(Second* this);
    11 
    12 thread First  { signal_once* lock; };
    13 thread Second { signal_once* lock; };
     9DECL_THREAD(First);
     10DECL_THREAD(Second);
    1411
    1512void ?{}( First * this, signal_once* lock ) { this->lock = lock; }
    1613void ?{}( Second * this, signal_once* lock ) { this->lock = lock; }
     14
     15void ^?{}( First  * mutex this ) {}
     16void ^?{}( Second * mutex this ) {}
    1717
    1818void main(First* this) {
     
    3939                processor p;
    4040                {
    41                         First  f = { &lock };
    42                         Second s = { &lock };
     41                        scoped(First)  f = { &lock };
     42                        scoped(Second) s = { &lock };
    4343                }
    4444        }
Note: See TracChangeset for help on using the changeset viewer.