Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/coroutine

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