Changeset b10affd for src/libcfa/concurrency/coroutine
- Timestamp:
- Mar 30, 2018, 7:21:28 PM (6 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, with_gc
- Children:
- 273cde6
- Parents:
- fae90d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine
rfae90d5 rb10affd 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 30 07:58:29 201713 // Update Count : 312 // Last Modified On : Fri Mar 30 18:23:45 2018 13 // Update Count : 8 14 14 // 15 15 … … 60 60 } 61 61 62 // Get current coroutine63 extern thread_local coroutine_desc * volatile this_coroutine;64 65 62 // Private wrappers for context switch and stack creation 66 63 extern void CoroutineCtxSwitch(coroutine_desc * src, coroutine_desc * dst); … … 69 66 // Suspend implementation inlined for performance 70 67 static inline void suspend() { 71 coroutine_desc * src = this_coroutine;// optimization68 coroutine_desc * src = TL_GET( this_coroutine ); // optimization 72 69 73 70 assertf( src->last != 0, … … 86 83 forall(dtype T | is_coroutine(T)) 87 84 static inline void resume(T & cor) { 88 coroutine_desc * src = this_coroutine;// optimization85 coroutine_desc * src = TL_GET( this_coroutine ); // optimization 89 86 coroutine_desc * dst = get_coroutine(cor); 90 87 … … 111 108 112 109 static inline void resume(coroutine_desc * dst) { 113 coroutine_desc * src = this_coroutine;// optimization110 coroutine_desc * src = TL_GET( this_coroutine ); // optimization 114 111 115 112 // not resuming self ?
Note: See TracChangeset
for help on using the changeset viewer.