Ignore:
Timestamp:
Apr 9, 2019, 10:15:34 AM (5 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e8e457e
Parents:
e3a5a73
Message:

coroutine and thread no longer store stack size

File:
1 edited

Legend:

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

    re3a5a73 r69a61d2  
    6969struct current_stack_info_t {
    7070        __stack_t * storage;            // pointer to stack object
    71         unsigned int size;              // size of stack
    7271        void *base;                             // base of stack
    7372        void *limit;                    // stack grows towards stack limit
     
    8281        rlimit r;
    8382        getrlimit( RLIMIT_STACK, &r);
    84         this.size = r.rlim_cur;
    85 
    86         this.limit = (void *)(((intptr_t)this.base) - this.size);
     83        size_t size = r.rlim_cur;
     84
     85        this.limit = (void *)(((intptr_t)this.base) - size);
    8786        this.context = &storage_mainThreadCtx;
    8887}
     
    9594        stack.storage = info->storage;
    9695        with(*stack.storage) {
    97                 size      = info->size;
    9896                limit     = info->limit;
    9997                base      = info->base;
     
    370368
    371369        // context switch to specified coroutine
     370        verify( dst->context.SP );
    372371        CtxSwitch( &src->context, &dst->context );
    373372        // when CtxSwitch returns we are back in the src coroutine
Note: See TracChangeset for help on using the changeset viewer.