- File:
-
- 1 edited
-
libcfa/src/concurrency/coroutine.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.hfa
rfd54fef r5456537 22 22 //----------------------------------------------------------------------------- 23 23 // Exception thrown from resume when a coroutine stack is cancelled. 24 FORALL_DATA_EXCEPTION(CoroutineCancelled, (coroutine_t &), (coroutine_t)) (24 EHM_FORALL_EXCEPTION(CoroutineCancelled, (coroutine_t &), (coroutine_t)) ( 25 25 coroutine_t * the_coroutine; 26 26 exception_t * the_exception; … … 60 60 //----------------------------------------------------------------------------- 61 61 // Public coroutine API 62 forall(T & | is_coroutine(T) )62 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)); }) 63 63 void prime(T & cor); 64 64 … … 130 130 131 131 forall(T & | is_coroutine(T)) 132 void __cfaehm_cancelled_coroutine( T & cor, $coroutine * desc ); 132 void __cfaehm_cancelled_coroutine( 133 T & cor, $coroutine * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)) ); 133 134 134 135 // Resume implementation inlined for performance 135 forall(T & | is_coroutine(T) )136 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)); }) 136 137 static inline T & resume(T & cor) { 137 138 // optimization : read TLS once and reuse it … … 163 164 $ctx_switch( src, dst ); 164 165 if ( unlikely(dst->cancellation) ) { 165 __cfaehm_cancelled_coroutine( cor, dst );166 __cfaehm_cancelled_coroutine( cor, dst, _default_vtable ); 166 167 } 167 168
Note:
See TracChangeset
for help on using the changeset viewer.