Ignore:
Timestamp:
Dec 5, 2017, 2:35:03 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
f9feab8
Parents:
9c35431 (diff), 65197c2 (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' into cleanup-dtors

File:
1 edited

Legend:

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

    r9c35431 rc13e8dc8  
    2929#define __CFA_INVOKE_PRIVATE__
    3030#include "invoke.h"
    31 
    3231
    3332//-----------------------------------------------------------------------------
     
    7675void ^?{}(coStack_t & this) {
    7776        if ( ! this.userStack && this.storage ) {
    78                 LIB_DEBUG_DO(
     77                __cfaabi_dbg_debug_do(
    7978                        if ( mprotect( this.storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) {
    8079                                abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );
     
    131130
    132131                // assume malloc has 8 byte alignment so add 8 to allow rounding up to 16 byte alignment
    133                 LIB_DEBUG_DO( this->storage = memalign( pageSize, cxtSize + this->size + pageSize ) );
    134                 LIB_NO_DEBUG_DO( this->storage = malloc( cxtSize + this->size + 8 ) );
     132                __cfaabi_dbg_debug_do( this->storage = memalign( pageSize, cxtSize + this->size + pageSize ) );
     133                __cfaabi_dbg_no_debug_do( this->storage = malloc( cxtSize + this->size + 8 ) );
    135134
    136                 LIB_DEBUG_DO(
     135                __cfaabi_dbg_debug_do(
    137136                        if ( mprotect( this->storage, pageSize, PROT_NONE ) == -1 ) {
    138137                                abortf( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) );
     
    144143                } // if
    145144
    146                 LIB_DEBUG_DO( this->limit = (char *)this->storage + pageSize );
    147                 LIB_NO_DEBUG_DO( this->limit = (char *)libCeiling( (unsigned long)this->storage, 16 ) ); // minimum alignment
     145                __cfaabi_dbg_debug_do( this->limit = (char *)this->storage + pageSize );
     146                __cfaabi_dbg_no_debug_do( this->limit = (char *)libCeiling( (unsigned long)this->storage, 16 ) ); // minimum alignment
    148147
    149148        } else {
Note: See TracChangeset for help on using the changeset viewer.