Changeset adaee12 for libcfa/src/concurrency
- Timestamp:
- Apr 28, 2021, 1:06:13 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7fd2db6
- Parents:
- e9c0b4c (diff), c7015e6b (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. - Location:
- libcfa/src/concurrency
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
re9c0b4c radaee12 61 61 forall(T & | is_coroutine(T)) 62 62 void __cfaehm_cancelled_coroutine( 63 T & cor, $coroutine * desc, _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable) {63 T & cor, $coroutine * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)) ) { 64 64 verify( desc->cancellation ); 65 65 desc->state = Cancelled; … … 145 145 // Part of the Public API 146 146 // Not inline since only ever called once per coroutine 147 forall(T & | is_coroutine(T) | { _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable; })147 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)); }) 148 148 void prime(T& cor) { 149 149 $coroutine* this = get_coroutine(cor); -
libcfa/src/concurrency/coroutine.hfa
re9c0b4c radaee12 60 60 //----------------------------------------------------------------------------- 61 61 // Public coroutine API 62 forall(T & | is_coroutine(T) | { _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable; })62 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)); }) 63 63 void prime(T & cor); 64 64 … … 131 131 forall(T & | is_coroutine(T)) 132 132 void __cfaehm_cancelled_coroutine( 133 T & cor, $coroutine * desc, _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable);133 T & cor, $coroutine * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)) ); 134 134 135 135 // Resume implementation inlined for performance 136 forall(T & | is_coroutine(T) | { _EHM_VTABLE_TYPE(CoroutineCancelled)(T) & const _default_vtable; })136 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)); }) 137 137 static inline T & resume(T & cor) { 138 138 // optimization : read TLS once and reuse it -
libcfa/src/concurrency/stats.cfa
re9c0b4c radaee12 126 126 127 127 char buf[1024]; 128 strstream sstr = { buf, 1024 };128 ostrstream sstr = { buf, 1024 }; 129 129 130 130 if( flags & CFA_STATS_READY_Q ) { -
libcfa/src/concurrency/thread.cfa
re9c0b4c radaee12 82 82 83 83 forall(T & | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)) 84 | { _EHM_VTABLE_TYPE(ThreadCancelled)(T) & const _default_vtable; })84 | { EHM_DEFAULT_VTABLE(ThreadCancelled, (T)); }) 85 85 void ?{}( thread_dtor_guard_t & this, 86 86 T & thrd, void(*cancelHandler)(ThreadCancelled(T) &)) { … … 161 161 //----------------------------------------------------------------------------- 162 162 forall(T & | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)) 163 | { _EHM_VTABLE_TYPE(ThreadCancelled)(T) & const _default_vtable; })163 | { EHM_DEFAULT_VTABLE(ThreadCancelled, (T)); }) 164 164 T & join( T & this ) { 165 165 thread_dtor_guard_t guard = { this, defaultResumptionHandler }; -
libcfa/src/concurrency/thread.hfa
re9c0b4c radaee12 80 80 81 81 forall( T & | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)) 82 | { _EHM_VTABLE_TYPE(ThreadCancelled)(T) & const _default_vtable; })82 | { EHM_DEFAULT_VTABLE(ThreadCancelled, (T)); }) 83 83 void ?{}( thread_dtor_guard_t & this, T & thrd, void(*)(ThreadCancelled(T) &) ); 84 84 void ^?{}( thread_dtor_guard_t & this ); … … 127 127 // join 128 128 forall( T & | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)) 129 | { _EHM_VTABLE_TYPE(ThreadCancelled)(T) & const _default_vtable; })129 | { EHM_DEFAULT_VTABLE(ThreadCancelled, (T)); }) 130 130 T & join( T & this ); 131 131
Note:
See TracChangeset
for help on using the changeset viewer.