- File:
-
- 1 edited
-
tests/concurrent/coroutineYield.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/coroutineYield.c
r200fcb3 r096a2ff 6 6 7 7 #define __kick_rate 150000ul 8 #include "long_tests.h fa"8 #include "long_tests.h" 9 9 10 10 #ifndef PREEMPTION_RATE … … 27 27 while(true) { 28 28 #if !defined(TEST_FOREVER) 29 sout | "Coroutine 1" ;29 sout | "Coroutine 1" | endl; 30 30 #endif 31 31 yield(); 32 32 #if !defined(TEST_FOREVER) 33 sout | "Coroutine 2" ;33 sout | "Coroutine 2" | endl; 34 34 #endif 35 35 suspend(); … … 42 42 for(int i = 0; TEST(i < N); i++) { 43 43 #if !defined(TEST_FOREVER) 44 sout | "Thread 1" ;44 sout | "Thread 1" | endl; 45 45 #endif 46 46 resume(c); 47 47 #if !defined(TEST_FOREVER) 48 sout | "Thread 2" ;48 sout | "Thread 2" | endl; 49 49 #endif 50 50 yield();
Note:
See TracChangeset
for help on using the changeset viewer.