Changeset 7fbe450
- Timestamp:
 - Jan 18, 2017, 12:06:44 PM (9 years ago)
 - Branches:
 - ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
 - Children:
 - c84e80a
 - Parents:
 - c49bf54
 - Location:
 - src
 - Files:
 - 
      
- 4 edited
 
- 
          
  examples/thread.c (modified) (3 diffs)
 - 
          
  libcfa/concurrency/coroutines (modified) (1 diff)
 - 
          
  libcfa/concurrency/threads (modified) (1 diff)
 - 
          
  tests/coroutine.c (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
src/examples/thread.c
rc49bf54 r7fbe450 26 26 void ^?{}( MyThread * this ) {} 27 27 28 void co_main(MyThread* this) {28 void main(MyThread* this) { 29 29 printf("Main called with %p\n", this); 30 30 printf("Thread value is %d\n", this->value); … … 44 44 printf("Address %p\n", this); 45 45 printf("handle %p\n", get_thread(this)); 46 printf("main %p\n", co_main);46 printf("main %p\n", main); 47 47 printf("get_t %p\n", get_thread); 48 48 printf("invoke %p\n", CtxInvokeThread); … … 57 57 thread(MyThread) thread1; 58 58 59 printf("Main is %p\n", this_coroutine()); 59 printf("Main is %p\n", this_coroutine()); 60 60 61 61 printf("First thread created\n");  - 
      
src/libcfa/concurrency/coroutines
rc49bf54 r7fbe450 26 26 // Anything that is resumed is a coroutine. 27 27 trait is_coroutine(dtype T) { 28 void co_main(T * this);28 void main(T * this); 29 29 coroutine * get_coroutine(T * this); 30 30 };  - 
      
src/libcfa/concurrency/threads
rc49bf54 r7fbe450 28 28 // Anything that is resumed is a coroutine. 29 29 trait is_thread(dtype T /*| sized(T)*/) { 30 void co_main(T* this);30 void main(T* this); 31 31 thread_h* get_thread(T* this); 32 32 /*void ?{}(T*);  - 
      
src/tests/coroutine.c
rc49bf54 r7fbe450 15 15 } 16 16 17 void co_main(Fibonacci* this) {17 void main(Fibonacci* this) { 18 18 #ifdef MORE_DEBUG 19 19 sout | "Starting main of coroutine " | this | endl;  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.