Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/monitor.c

    rcb0e6de rbd4d011  
    44#include <thread>
    55
    6 struct global_t {
     6monitor global_t {
    77        int value;
    8         monitor_desc m;
    98};
    109
    1110void ?{}(global_t * this) {
    1211        this->value = 0;
    13 }
    14 
    15 monitor_desc * get_monitor( global_t * this ) {
    16         return &this->m;
    1712}
    1813
     
    3126}
    3227
    33 struct MyThread { thread_desc __thrd; };
    34 
    35 DECL_THREAD(MyThread);
    36 
    37 void ?{}( MyThread * this ) {}
    38 void ^?{}( MyThread * mutex this ) {}
     28thread MyThread {};
    3929
    4030void main( MyThread* this ) {
     
    4535
    4636int main(int argc, char* argv[]) {
    47         assert( global.m.entry_queue.tail != NULL );
     37        assert( global.__mon.entry_queue.tail != NULL );
    4838        processor p;
    4939        {
    50                 scoped(MyThread) f[4];
     40                MyThread f[4];
    5141        }
    5242        sout | global.value | endl;
Note: See TracChangeset for help on using the changeset viewer.