simplify spawn block handling
This commit is contained in:
parent
7578906310
commit
ef2a4df925
|
@ -181,6 +181,15 @@ protected:
|
||||||
auto sign_mask = 1ULL<<(W-1);
|
auto sign_mask = 1ULL<<(W-1);
|
||||||
return (from & mask) | ((from & sign_mask) ? ~mask : 0);
|
return (from & mask) | ((from & sign_mask) ? ~mask : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void process_spawn_blocks() {
|
||||||
|
for(auto it = std::begin(spawn_blocks); it!=std::end(spawn_blocks);)
|
||||||
|
if(*it){
|
||||||
|
(*it)();
|
||||||
|
++it;
|
||||||
|
} else
|
||||||
|
spawn_blocks.erase(it);
|
||||||
|
}
|
||||||
<%functions.each{ it.eachLine { %>
|
<%functions.each{ it.eachLine { %>
|
||||||
${it}<%}%>
|
${it}<%}%>
|
||||||
<%}%>
|
<%}%>
|
||||||
|
@ -226,7 +235,7 @@ private:
|
||||||
<%instr.behavior.eachLine{%>${it}
|
<%instr.behavior.eachLine{%>${it}
|
||||||
<%}%>} catch(...){}
|
<%}%>} catch(...){}
|
||||||
// post execution stuff
|
// post execution stuff
|
||||||
for(auto& spawn_block:spawn_blocks) spawn_block();
|
process_spawn_blocks();
|
||||||
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, ${idx});
|
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, ${idx});
|
||||||
// trap check
|
// trap check
|
||||||
if(*trap_state!=0){
|
if(*trap_state!=0){
|
||||||
|
|
Loading…
Reference in New Issue