Changeset e014c6d


Ignore:
Timestamp:
Jun 2, 2021, 5:59:44 PM (16 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b303ec1
Parents:
436d7d7 (diff), ab5baab (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

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r436d7d7 re014c6d  
    3232                        stage('Package') {
    3333                                trigger_dist( commitId, currentBuild.number.toString() )
     34                        }
     35
     36                        stage('Promote') {
     37                                trigger_prom()
    3438                        }
    3539                }
     
    123127}
    124128
     129def trigger_prom() {
     130        def result = build job: 'Cforall_Promote_Ref', propagate: false
     131
     132        echo(result.result)
     133
     134        if(result.result != 'SUCCESS') {
     135                sh("wget -q -O - https://cforall.uwaterloo.ca/jenkins/job/Cforall_Promote_Ref/${result.number}/consoleText")
     136                error(result.result)
     137        }
     138}
     139
    125140//===========================================================================================================
    126141//Routine responsible of sending the email notification once the build is completed
  • libcfa/src/concurrency/coroutine.cfa

    r436d7d7 re014c6d  
    267267                struct $coroutine * cor = active_coroutine();
    268268
     269                // get the active thread once
     270                $thread * athrd = active_thread();
     271
     272                /* paranoid */ verify( athrd->corctx_flag );
     273                athrd->corctx_flag = false;
     274
    269275                if(cor->state == Primed) {
    270276                        __cfactx_suspend();
  • libcfa/src/concurrency/coroutine.hfa

    r436d7d7 re014c6d  
    8686        src->state = src->state == Halted ? Halted : Blocked;
    8787
     88        // get the active thread once
     89        $thread * athrd = active_thread();
     90
     91        // Mark the coroutine
     92        /* paranoid */ verify( !athrd->corctx_flag );
     93        athrd->corctx_flag = true;
     94
    8895        // set new coroutine that task is executing
    89         active_thread()->curr_cor = dst;
     96        athrd->curr_cor = dst;
    9097
    9198        // context switch to specified coroutine
    92         verify( dst->context.SP );
     99        /* paranoid */ verify( dst->context.SP );
    93100        __cfactx_switch( &src->context, &dst->context );
    94101        // when __cfactx_switch returns we are back in the src coroutine
     102
     103        /* paranoid */ verify( athrd->corctx_flag );
     104        athrd->corctx_flag = false;
    95105
    96106        // set state of new coroutine to active
  • libcfa/src/concurrency/invoke.h

    r436d7d7 re014c6d  
    167167                enum __Preemption_Reason preempted:8;
    168168
     169                bool corctx_flag;
     170
    169171                //SKULLDUGGERY errno is not save in the thread data structure because returnToKernel appears to be the only function to require saving and restoring it
    170172
  • libcfa/src/concurrency/kernel.cfa

    r436d7d7 re014c6d  
    424424
    425425                /* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd_dst->canary );
    426                 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst );
    427                 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst );
     426                /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->corctx_flag, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst );
     427                /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->corctx_flag, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst );
    428428                /* paranoid */ verify( thrd_dst->context.SP );
    429429                /* paranoid */ verify( thrd_dst->curr_cluster == this->cltr );
  • libcfa/src/concurrency/kernel/startup.cfa

    r436d7d7 re014c6d  
    397397        // make sure the current state is still correct
    398398        /* paranoid */ verify(src->state == Ready);
     399        src->corctx_flag = true;
    399400
    400401        // context switch to specified coroutine
  • libcfa/src/concurrency/thread.cfa

    r436d7d7 re014c6d  
    3232        state = Start;
    3333        preempted = __NO_PREEMPTION;
     34        corctx_flag = false;
    3435        curr_cor = &self_cor;
    3536        self_mon.owner = &this;
Note: See TracChangeset for help on using the changeset viewer.