Changeset 9b443c7f for src/libcfa/concurrency/thread
- Timestamp:
- Mar 15, 2017, 5:02:25 PM (8 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:
- f2e40a9f
- Parents:
- 5a3ac84 (diff), 29f44a74 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/libcfa/concurrency/thread ¶
r5a3ac84 r9b443c7f 6 6 // file "LICENCE" distributed with Cforall. 7 7 // 8 // thread s--8 // thread -- 9 9 // 10 10 // Author : Thierry Delisle … … 21 21 #include "invoke.h" 22 22 23 #include "coroutine s"23 #include "coroutine" 24 24 25 25 //----------------------------------------------------------------------------- … … 29 29 trait is_thread(dtype T) { 30 30 void main(T* this); 31 thread * get_thread(T* this);31 thread_desc* get_thread(T* this); 32 32 }; 33 33 34 #define DECL_THREAD(X) thread * get_thread(X* this) { return &this->t; } void main(X* this)34 #define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->t; } void main(X* this) 35 35 36 36 forall( dtype T | is_thread(T) ) 37 static inline coroutine * get_coroutine(T* this) {37 static inline coroutine_desc* get_coroutine(T* this) { 38 38 return &get_thread(this)->c; 39 39 } 40 40 41 static inline coroutine * get_coroutine(thread* this) {41 static inline coroutine_desc* get_coroutine(thread_desc* this) { 42 42 return &this->c; 43 43 } 44 44 45 thread * this_thread(void);45 thread_desc * this_thread(void); 46 46 47 47 //----------------------------------------------------------------------------- 48 48 // Ctors and dtors 49 void ?{}(thread * this);50 void ^?{}(thread * this);49 void ?{}(thread_desc* this); 50 void ^?{}(thread_desc* this); 51 51 52 52 //-----------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.