- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine.c
rb69ea6b rc40e7c5 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 8 16:10:31 201813 // Update Count : 412 // Last Modified On : Fri Jul 21 22:34:57 2017 13 // Update Count : 1 14 14 // 15 15 … … 77 77 __cfaabi_dbg_debug_do( 78 78 if ( mprotect( this.storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) { 79 abort ( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );79 abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) ); 80 80 } 81 81 ); … … 99 99 // Wrapper for co 100 100 void CoroutineCtxSwitch(coroutine_desc* src, coroutine_desc* dst) { 101 verify( preemption.enabled || this_processor->do_terminate ); 102 disable_interrupts(); 101 // THREAD_GETMEM( This )->disableInterrupts(); 103 102 104 103 // set state of current coroutine to inactive … … 116 115 src->state = Active; 117 116 118 enable_interrupts( __cfaabi_dbg_ctx ); 119 verify( preemption.enabled || this_processor->do_terminate ); 117 // THREAD_GETMEM( This )->enableInterrupts(); 120 118 } //ctxSwitchDirect 121 119 … … 137 135 __cfaabi_dbg_debug_do( 138 136 if ( mprotect( storage, pageSize, PROT_NONE ) == -1 ) { 139 abort ( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) );137 abortf( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) ); 140 138 } // if 141 139 ); 142 140 143 141 if ( (intptr_t)storage == 0 ) { 144 abort ( "Attempt to allocate %zd bytes of storage for coroutine or task execution-state but insufficient memory available.", size );142 abortf( "Attempt to allocate %d bytes of storage for coroutine or task execution-state but insufficient memory available.", size ); 145 143 } // if 146 144
Note:
See TracChangeset
for help on using the changeset viewer.