- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutines
r77e6fcb r0c92c9f 30 30 }; 31 31 32 #define DECL_COROUTINE(X) static inline coroutine* get_coroutine(X* this) { return &this->c; } void main(X* this) 32 #define DECL_COROUTINE(X) static inline coroutine* get_coroutine(X* this) { return &this->c; } void main(X* this); 33 33 34 34 //----------------------------------------------------------------------------- … … 110 110 } 111 111 112 static inline void resume(coroutine * dst) {113 coroutine * src = this_coroutine(); // optimization114 115 // not resuming self ?116 if ( src != dst ) {117 assertf( dst->notHalted ,118 "Attempt by coroutine %.256s (%p) to resume terminated coroutine %.256s (%p).\n"119 "Possible cause is terminated coroutine's main routine has already returned.",120 src->name, src, dst->name, dst );121 122 // set last resumer123 dst->last = src;124 } // if125 126 // always done for performance testing127 CoroutineCtxSwitch( src, dst );128 }129 130 112 #endif //COROUTINES_H 131 113
Note:
See TracChangeset
for help on using the changeset viewer.