Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/coroutine

    rb10affd rb462670  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 30 18:23:45 2018
    13 // Update Count     : 8
     12// Last Modified On : Wed Aug 30 07:58:29 2017
     13// Update Count     : 3
    1414//
    1515
     
    6060}
    6161
     62// Get current coroutine
     63extern thread_local coroutine_desc * volatile this_coroutine;
     64
    6265// Private wrappers for context switch and stack creation
    6366extern void CoroutineCtxSwitch(coroutine_desc * src, coroutine_desc * dst);
     
    6669// Suspend implementation inlined for performance
    6770static inline void suspend() {
    68         coroutine_desc * src = TL_GET( this_coroutine );                        // optimization
     71        coroutine_desc * src = this_coroutine;          // optimization
    6972
    7073        assertf( src->last != 0,
     
    8386forall(dtype T | is_coroutine(T))
    8487static inline void resume(T & cor) {
    85         coroutine_desc * src = TL_GET( this_coroutine );                        // optimization
     88        coroutine_desc * src = this_coroutine;          // optimization
    8689        coroutine_desc * dst = get_coroutine(cor);
    8790
     
    108111
    109112static inline void resume(coroutine_desc * dst) {
    110         coroutine_desc * src = TL_GET( this_coroutine );                        // optimization
     113        coroutine_desc * src = this_coroutine;          // optimization
    111114
    112115        // not resuming self ?
Note: See TracChangeset for help on using the changeset viewer.