Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/coroutine.cfa

    r09f357ec re3fea42  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec  5 14:37:29 2019
    13 // Update Count     : 15
     12// Last Modified On : Tue Feb  4 12:29:25 2020
     13// Update Count     : 16
    1414//
    1515
     
    8989}
    9090
    91 void ?{}( coroutine_desc & this, const char * name, void * storage, size_t storageSize ) with( this ) {
     91void ?{}( coroutine_desc & this, const char name[], void * storage, size_t storageSize ) with( this ) {
    9292        (this.context){0p, 0p};
    9393        (this.stack){storage, storageSize};
     
    187187// is not inline (We can't inline Cforall in C)
    188188extern "C" {
    189         void __leave_coroutine( struct coroutine_desc * src ) {
     189        void __suspend_internal(void) {
     190                suspend();
     191        }
     192
     193        void __leave_coroutine( coroutine_desc * src ) {
    190194                coroutine_desc * starter = src->cancellation != 0 ? src->last : src->starter;
    191195
     
    203207                CoroutineCtxSwitch( src, starter );
    204208        }
    205 
    206         struct coroutine_desc * __finish_coroutine(void) {
    207                 struct coroutine_desc * cor = kernelTLS.this_thread->curr_cor;
    208 
    209                 if(cor->state == Primed) {
    210                         suspend();
    211                 }
    212 
    213                 cor->state = Active;
    214 
    215                 return cor;
    216         }
    217209}
    218210
Note: See TracChangeset for help on using the changeset viewer.