Ignore:
Timestamp:
Jul 12, 2021, 1:44:35 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
605673f, 9345684
Parents:
cf444b6 (diff), a953c2e3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    rcf444b6 r6ff08d8  
    3737
    3838extern "C" {
    39         void _CtxCoroutine_Unwind(struct _Unwind_Exception * storage, struct $coroutine *) __attribute__ ((__noreturn__));
     39        void _CtxCoroutine_Unwind(struct _Unwind_Exception * storage, struct coroutine$ *) __attribute__ ((__noreturn__));
    4040        static void _CtxCoroutine_UnwindCleanup(_Unwind_Reason_Code, struct _Unwind_Exception *) __attribute__ ((__noreturn__));
    4141        static void _CtxCoroutine_UnwindCleanup(_Unwind_Reason_Code, struct _Unwind_Exception *) {
     
    6262forall(T & | is_coroutine(T))
    6363void __cfaehm_cancelled_coroutine(
    64                 T & cor, $coroutine * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)) ) {
     64                T & cor, coroutine$ * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)) ) {
    6565        verify( desc->cancellation );
    6666        desc->state = Cancelled;
     
    114114}
    115115
    116 void ?{}( $coroutine & this, const char name[], void * storage, size_t storageSize ) with( this ) {
     116void ?{}( coroutine$ & this, const char name[], void * storage, size_t storageSize ) with( this ) {
    117117        (this.context){0p, 0p};
    118118        (this.stack){storage, storageSize};
     
    124124}
    125125
    126 void ^?{}($coroutine& this) {
     126void ^?{}(coroutine$& this) {
    127127        if(this.state != Halted && this.state != Start && this.state != Primed) {
    128                 $coroutine * src = active_coroutine();
    129                 $coroutine * dst = &this;
     128                coroutine$ * src = active_coroutine();
     129                coroutine$ * dst = &this;
    130130
    131131                struct _Unwind_Exception storage;
     
    148148forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled, (T)); })
    149149void prime(T& cor) {
    150         $coroutine* this = get_coroutine(cor);
     150        coroutine$* this = get_coroutine(cor);
    151151        assert(this->state == Start);
    152152
     
    248248// is not inline (We can't inline Cforall in C)
    249249extern "C" {
    250         void __cfactx_cor_leave( struct $coroutine * src ) {
    251                 $coroutine * starter = src->cancellation != 0 ? src->last : src->starter;
     250        void __cfactx_cor_leave( struct coroutine$ * src ) {
     251                coroutine$ * starter = src->cancellation != 0 ? src->last : src->starter;
    252252
    253253                src->state = Halted;
     
    265265        }
    266266
    267         struct $coroutine * __cfactx_cor_finish(void) {
    268                 struct $coroutine * cor = active_coroutine();
     267        struct coroutine$ * __cfactx_cor_finish(void) {
     268                struct coroutine$ * cor = active_coroutine();
    269269
    270270                // get the active thread once
    271                 $thread * athrd = active_thread();
     271                thread$ * athrd = active_thread();
    272272
    273273                /* paranoid */ verify( athrd->corctx_flag );
Note: See TracChangeset for help on using the changeset viewer.