Changeset 77e6fcb for src/libcfa


Ignore:
Timestamp:
Feb 1, 2017, 2:55:06 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, resolv-new, with_gc
Children:
de90452
Parents:
8761006c
Message:

Removed trailing semi-colon on thread/coroutine declaration macro

Location:
src/libcfa/concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/coroutines

    r8761006c r77e6fcb  
    3030};
    3131
    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)
    3333
    3434//-----------------------------------------------------------------------------
     
    110110}
    111111
     112static inline void resume(coroutine * dst) {
     113        coroutine * src = this_coroutine();             // optimization
     114
     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 resumer
     123                dst->last = src;
     124        } // if
     125
     126      // always done for performance testing
     127        CoroutineCtxSwitch( src, dst );
     128}
     129
    112130#endif //COROUTINES_H
    113131
  • src/libcfa/concurrency/kernel.c

    r8761006c r77e6fcb  
    4343};
    4444
    45 DECL_COROUTINE(processorCtx_t)
     45DECL_COROUTINE(processorCtx_t);
    4646
    4747#define KERNEL_STORAGE(T,X) static char X##_storage[sizeof(T)]
  • src/libcfa/concurrency/threads

    r8761006c r77e6fcb  
    3232};
    3333
    34 #define DECL_THREAD(X) thread* get_thread(X* this) { return &this->t; } void main(X* this);
     34#define DECL_THREAD(X) thread* get_thread(X* this) { return &this->t; } void main(X* this)
    3535
    3636forall( dtype T | is_thread(T) )
Note: See TracChangeset for help on using the changeset viewer.