Changeset 200fcb3 for tests/concurrent/thread.c
- Timestamp:
- Dec 12, 2018, 9:16:12 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 5ebb1368
- Parents:
- 3d99498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/thread.c
r3d99498 r200fcb3 12 12 void main(First& this) { 13 13 for(int i = 0; i < 10; i++) { 14 sout | "First : Suspend No." | i + 1 | endl;14 sout | "First : Suspend No." | i + 1; 15 15 yield(); 16 16 } … … 21 21 P(*this.lock); 22 22 for(int i = 0; i < 10; i++) { 23 sout | "Second : Suspend No." | i + 1 | endl;23 sout | "Second : Suspend No." | i + 1; 24 24 yield(); 25 25 } … … 29 29 int main(int argc, char* argv[]) { 30 30 semaphore lock = { 0 }; 31 sout | "User main begin" | endl;31 sout | "User main begin"; 32 32 { 33 33 processor p; … … 37 37 } 38 38 } 39 sout | "User main end" | endl;39 sout | "User main end"; 40 40 }
Note: See TracChangeset
for help on using the changeset viewer.