Ignore:
File:
1 edited

Legend:

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

    r09f357ec rc8c0c7c5  
    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 : Sat Nov 30 09:59:36 2019
     13// Update Count     : 14
    1414//
    1515
     
    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.