- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine
rb10affd rb462670 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 30 18:23:45 201813 // Update Count : 812 // Last Modified On : Wed Aug 30 07:58:29 2017 13 // Update Count : 3 14 14 // 15 15 … … 60 60 } 61 61 62 // Get current coroutine 63 extern thread_local coroutine_desc * volatile this_coroutine; 64 62 65 // Private wrappers for context switch and stack creation 63 66 extern void CoroutineCtxSwitch(coroutine_desc * src, coroutine_desc * dst); … … 66 69 // Suspend implementation inlined for performance 67 70 static inline void suspend() { 68 coroutine_desc * src = TL_GET( this_coroutine );// optimization71 coroutine_desc * src = this_coroutine; // optimization 69 72 70 73 assertf( src->last != 0, … … 83 86 forall(dtype T | is_coroutine(T)) 84 87 static inline void resume(T & cor) { 85 coroutine_desc * src = TL_GET( this_coroutine );// optimization88 coroutine_desc * src = this_coroutine; // optimization 86 89 coroutine_desc * dst = get_coroutine(cor); 87 90 … … 108 111 109 112 static inline void resume(coroutine_desc * dst) { 110 coroutine_desc * src = TL_GET( this_coroutine );// optimization113 coroutine_desc * src = this_coroutine; // optimization 111 114 112 115 // not resuming self ?
Note:
See TracChangeset
for help on using the changeset viewer.