Ignore:
Timestamp:
Feb 12, 2018, 3:49:04 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
54c9000
Parents:
1dcd52a3 (diff), ff2d1139 (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:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r1dcd52a3 r7a052e34  
    3939//-----------------------------------------------------------------------------
    4040// Coroutine ctors and dtors
    41 void ?{}(coStack_t& this) {
    42         this.size               = 65000;        // size of stack
    43         this.storage    = NULL; // pointer to stack
    44         this.limit              = NULL; // stack grows towards stack limit
    45         this.base               = NULL; // base of stack
    46         this.context    = NULL; // address of cfa_context_t
    47         this.top                = NULL; // address of top of storage
    48         this.userStack  = false;
     41void ?{}(coStack_t& this) with( this ) {
     42        size            = 65000;        // size of stack
     43        storage = NULL; // pointer to stack
     44        limit           = NULL; // stack grows towards stack limit
     45        base            = NULL; // base of stack
     46        context = NULL; // address of cfa_context_t
     47        top             = NULL; // address of top of storage
     48        userStack       = false;
    4949}
    5050
     
    6060}
    6161
    62 void ?{}(coroutine_desc& this, const char * name) {
     62void ?{}(coroutine_desc& this, const char * name) with( this ) {
    6363        this.name = name;
    64         this.errno_ = 0;
    65         this.state = Start;
    66         this.starter = NULL;
    67         this.last = NULL;
     64        errno_ = 0;
     65        state = Start;
     66        starter = NULL;
     67        last = NULL;
    6868}
    6969
     
    9999// Wrapper for co
    100100void CoroutineCtxSwitch(coroutine_desc* src, coroutine_desc* dst) {
    101         // THREAD_GETMEM( This )->disableInterrupts();
     101        disable_interrupts();
    102102
    103103        // set state of current coroutine to inactive
     
    115115        src->state = Active;
    116116
    117         // THREAD_GETMEM( This )->enableInterrupts();
     117        enable_interrupts( __cfaabi_dbg_ctx );
    118118} //ctxSwitchDirect
    119119
Note: See TracChangeset for help on using the changeset viewer.