Changes in src/tests/monitor.c [cb0e6de:bd4d011]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/monitor.c
rcb0e6de rbd4d011 4 4 #include <thread> 5 5 6 structglobal_t {6 monitor global_t { 7 7 int value; 8 monitor_desc m;9 8 }; 10 9 11 10 void ?{}(global_t * this) { 12 11 this->value = 0; 13 }14 15 monitor_desc * get_monitor( global_t * this ) {16 return &this->m;17 12 } 18 13 … … 31 26 } 32 27 33 struct MyThread { thread_desc __thrd; }; 34 35 DECL_THREAD(MyThread); 36 37 void ?{}( MyThread * this ) {} 38 void ^?{}( MyThread * mutex this ) {} 28 thread MyThread {}; 39 29 40 30 void main( MyThread* this ) { … … 45 35 46 36 int main(int argc, char* argv[]) { 47 assert( global. m.entry_queue.tail != NULL );37 assert( global.__mon.entry_queue.tail != NULL ); 48 38 processor p; 49 39 { 50 scoped(MyThread)f[4];40 MyThread f[4]; 51 41 } 52 42 sout | global.value | endl;
Note:
See TracChangeset
for help on using the changeset viewer.