Ignore:
Timestamp:
Apr 4, 2019, 5:28:47 PM (3 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
211228e0
Parents:
b2f6113
Message:

UserStack? flag on coroutines is now folded into the storage pointer

File:
1 edited

Legend:

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

    rb2f6113 r8c01e1b  
    6868
    6969void ^?{}(__stack_info_t & this) {
    70         if ( ! this.userStack && this.storage ) {
    71                 void * storage = (char*)(this.storage) - this.storage->size;
     70        bool userStack = ((intptr_t)this.storage & 0x1) != 0;
     71        if ( ! userStack && this.storage ) {
     72                *((intptr_t*)&this.storage) &= (intptr_t)-1;
     73                void * storage = this.storage->limit;
    7274                __cfaabi_dbg_debug_do(
    7375                        storage = (char*)(storage) - __page_size;
     
    200202        this->storage->limit = storage;
    201203        this->storage->base  = (void*)((intptr_t)storage + size);
    202         this->userStack = userStack;
     204        *((intptr_t*)&this->storage) |= userStack ? 0x1 : 0x0;
    203205}
    204206
Note: See TracChangeset for help on using the changeset viewer.