Changeset 83a071f9 for src/libcfa/concurrency/thread
- Timestamp:
- Aug 11, 2017, 10:10:26 AM (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:
- fd344aa
- Parents:
- 8499c707
- File:
-
- 1 edited
-
src/libcfa/concurrency/thread (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/thread
r8499c707 r83a071f9 30 30 trait is_thread(dtype T) { 31 31 void ^?{}(T& mutex this); 32 void main(T *this);33 thread_desc* get_thread(T *this);32 void main(T& this); 33 thread_desc* get_thread(T& this); 34 34 }; 35 35 36 #define DECL_THREAD(X) thread_desc* get_thread(X * this) { return &this->__thrd; } void main(X*this)36 #define DECL_THREAD(X) thread_desc* get_thread(X& this) { return &this.__thrd; } void main(X& this) 37 37 38 38 forall( dtype T | is_thread(T) ) 39 static inline coroutine_desc* get_coroutine(T *this) {39 static inline coroutine_desc* get_coroutine(T & this) { 40 40 return &get_thread(this)->cor; 41 41 } 42 42 43 43 forall( dtype T | is_thread(T) ) 44 static inline monitor_desc* get_monitor(T *this) {44 static inline monitor_desc* get_monitor(T & this) { 45 45 return &get_thread(this)->mon; 46 46 } … … 57 57 58 58 forall( dtype T | is_thread(T) ) 59 void __thrd_start( T *this );59 void __thrd_start( T & this ); 60 60 61 61 //-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.