Ignore:
Timestamp:
Jun 16, 2017, 9:07:21 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, 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, resolv-new, with_gc
Children:
42b0d73
Parents:
667c7da
Message:

Added verify macro for asserts only present in debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/coroutine

    r667c7da r4aa2fb2  
    7171// Suspend implementation inlined for performance
    7272static inline void suspend() {
    73       coroutine_desc * src = this_coroutine();          // optimization
     73        coroutine_desc * src = this_coroutine();                // optimization
    7474
    7575        assertf( src->last != 0,
     
    9191        coroutine_desc * dst = get_coroutine(cor);
    9292
    93       if( unlikely(!dst->stack.base) ) {
     93        if( unlikely(!dst->stack.base) ) {
    9494                create_stack(&dst->stack, dst->stack.size);
    9595                CtxStart(cor, CtxInvokeCoroutine);
    9696        }
    9797
    98       // not resuming self ?
     98        // not resuming self ?
    9999        if ( src != dst ) {
    100100                assertf( dst->state != Halted ,
     
    103103                        src->name, src, dst->name, dst );
    104104
    105             // set last resumer
     105                // set last resumer
    106106                dst->last = src;
    107107        } // if
    108108
    109       // always done for performance testing
     109        // always done for performance testing
    110110        CoroutineCtxSwitch( src, dst );
    111111}
     
    114114        coroutine_desc * src = this_coroutine();                // optimization
    115115
    116       // not resuming self ?
     116        // not resuming self ?
    117117        if ( src != dst ) {
    118118                assertf( dst->state != Halted ,
     
    121121                        src->name, src, dst->name, dst );
    122122
    123             // set last resumer
     123                // set last resumer
    124124                dst->last = src;
    125125        } // if
    126126
    127       // always done for performance testing
     127        // always done for performance testing
    128128        CoroutineCtxSwitch( src, dst );
    129129}
Note: See TracChangeset for help on using the changeset viewer.