Changes in src/libcfa/concurrency/thread [17af7d1:cb0e6de]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/thread
r17af7d1 rcb0e6de 22 22 23 23 #include "coroutine" 24 #include "monitor" 24 25 25 26 //----------------------------------------------------------------------------- … … 28 29 // Anything that is resumed is a coroutine. 29 30 trait is_thread(dtype T) { 30 void ^?{}(T* this);31 void ^?{}(T* mutex this); 31 32 void main(T* this); 32 33 thread_desc* get_thread(T* this); … … 40 41 } 41 42 42 static inline coroutine_desc* get_coroutine(thread_desc* this) { 43 forall( dtype T | is_thread(T) ) 44 static inline monitor_desc* get_monitor(T * this) { 45 return &get_thread(this)->mon; 46 } 47 48 static inline coroutine_desc* get_coroutine(thread_desc * this) { 43 49 return &this->cor; 50 } 51 52 static inline monitor_desc* get_monitor(thread_desc * this) { 53 return &this->mon; 44 54 } 45 55
Note: See TracChangeset
for help on using the changeset viewer.