Changeset 69a61d2 for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Apr 9, 2019, 10:15:34 AM (5 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
re3a5a73 r69a61d2 69 69 struct current_stack_info_t { 70 70 __stack_t * storage; // pointer to stack object 71 unsigned int size; // size of stack72 71 void *base; // base of stack 73 72 void *limit; // stack grows towards stack limit … … 82 81 rlimit r; 83 82 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); 87 86 this.context = &storage_mainThreadCtx; 88 87 } … … 95 94 stack.storage = info->storage; 96 95 with(*stack.storage) { 97 size = info->size;98 96 limit = info->limit; 99 97 base = info->base; … … 370 368 371 369 // context switch to specified coroutine 370 verify( dst->context.SP ); 372 371 CtxSwitch( &src->context, &dst->context ); 373 372 // when CtxSwitch returns we are back in the src coroutine
Note: See TracChangeset
for help on using the changeset viewer.