Ignore:
Timestamp:
Apr 9, 2019, 10:15:34 AM (3 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
e8e457e
Parents:
e3a5a73
Message:

coroutine and thread no longer store stack size

File:
1 edited

Legend:

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

    re3a5a73 r69a61d2  
    8484
    8585void ?{}( coroutine_desc & this, const char * name, void * storage, size_t storageSize ) with( this ) {
     86        (this.context){NULL, NULL};
    8687        (this.stack){storage, storageSize};
    8788        this.name = name;
     
    137138
    138139        // context switch to specified coroutine
     140        verify( src->context.SP );
     141        verify( dst->context.SP );
    139142        CtxSwitch( &src->context, &dst->context );
    140143        // when CtxSwitch returns we are back in the src coroutine
     
    187190        } else {
    188191                userStack = true;
    189                 __cfaabi_dbg_print_safe("Kernel : stack obj %p using user stack %p(%zu bytes)\n", this, this->storage, this->storage->size);
     192                __cfaabi_dbg_print_safe("Kernel : stack obj %p using user stack %p(%zd bytes)\n", this, this->storage, (intptr_t)this->storage->limit - (intptr_t)this->storage->base);
    190193
    191194                // The stack must be aligned, advance the pointer to the next align data
     
    199202
    200203        this->storage = (__stack_t *)((intptr_t)storage + size);
    201         this->storage->size  = size;
    202204        this->storage->limit = storage;
    203205        this->storage->base  = (void*)((intptr_t)storage + size);
Note: See TracChangeset for help on using the changeset viewer.