cwFlowTypes.h/cpp,cwFlowNet.cpp : added modVarRecurseFl.
This commit is contained in:
parent
0e3ac61b68
commit
e180d501b2
@ -3649,6 +3649,9 @@ cw::rc_t cw::flow::exec_cycle( network_t& net )
|
|||||||
|
|
||||||
for(unsigned i=0; i<net.procN; ++i)
|
for(unsigned i=0; i<net.procN; ++i)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
net.procA[i]->modVarRecurseFl = true;
|
||||||
|
|
||||||
// Call notify() on all variables marked for notification that have changed since the last exec_cycle()
|
// Call notify() on all variables marked for notification that have changed since the last exec_cycle()
|
||||||
proc_notify(net.procA[i], kCallbackPnFl | kQuietPnFl);
|
proc_notify(net.procA[i], kCallbackPnFl | kQuietPnFl);
|
||||||
|
|
||||||
@ -3662,7 +3665,10 @@ cw::rc_t cw::flow::exec_cycle( network_t& net )
|
|||||||
rc = cwLogError(rc,"Execution failed on the proc:%s:%i.",cwStringNullGuard(net.procA[i]->label),net.procA[i]->label_sfx_id);
|
rc = cwLogError(rc,"Execution failed on the proc:%s:%i.",cwStringNullGuard(net.procA[i]->label),net.procA[i]->label_sfx_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
net.procA[i]->modVarRecurseFl = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return halt_fl ? ((unsigned)kEofRC) : rc;
|
return halt_fl ? ((unsigned)kEofRC) : rc;
|
||||||
|
@ -164,7 +164,7 @@ namespace cw
|
|||||||
rc_t _mod_var_map_update( variable_t* var )
|
rc_t _mod_var_map_update( variable_t* var )
|
||||||
{
|
{
|
||||||
rc_t rc = kOkRC;
|
rc_t rc = kOkRC;
|
||||||
if( cwIsFlag(var->varDesc->flags,kNotifyVarDescFl ) )
|
if( cwIsFlag(var->varDesc->flags,kNotifyVarDescFl ) && var->proc->modVarRecurseFl==false )
|
||||||
{
|
{
|
||||||
// if the var is already modVarMapA[] then there is nothing to do
|
// if the var is already modVarMapA[] then there is nothing to do
|
||||||
// (use acquire to prevent rd/wr from moving before this op)
|
// (use acquire to prevent rd/wr from moving before this op)
|
||||||
@ -794,8 +794,7 @@ errLabel:
|
|||||||
cw::rc_t cw::flow::class_preset_has_var( const class_preset_t* class_preset, const char* var_label, bool& fl_ref )
|
cw::rc_t cw::flow::class_preset_has_var( const class_preset_t* class_preset, const char* var_label, bool& fl_ref )
|
||||||
{
|
{
|
||||||
rc_t rc = kOkRC;
|
rc_t rc = kOkRC;
|
||||||
const object_t* var_cfg;
|
|
||||||
|
|
||||||
fl_ref = false;
|
fl_ref = false;
|
||||||
|
|
||||||
if( class_preset->cfg == nullptr )
|
if( class_preset->cfg == nullptr )
|
||||||
|
@ -151,6 +151,7 @@ namespace cw
|
|||||||
unsigned varMapN; // varMapN = varMapIdN * varMapChN
|
unsigned varMapN; // varMapN = varMapIdN * varMapChN
|
||||||
variable_t** varMapA; // varMapA[ varMapN ] = allows fast lookup from ('vid','chIdx) to variable
|
variable_t** varMapA; // varMapA[ varMapN ] = allows fast lookup from ('vid','chIdx) to variable
|
||||||
|
|
||||||
|
bool modVarRecurseFl; // flag used to prevent call to set_var() from inside _notify() from calling var_schedule_notification()
|
||||||
variable_t** modVarMapA; // modVarMapA[ modVarMapN ]
|
variable_t** modVarMapA; // modVarMapA[ modVarMapN ]
|
||||||
unsigned modVarMapN; // modVarMapN == varMapN
|
unsigned modVarMapN; // modVarMapN == varMapN
|
||||||
unsigned modVarMapTailIdx; // index of next full slot in varMapA[]
|
unsigned modVarMapTailIdx; // index of next full slot in varMapA[]
|
||||||
|
Loading…
Reference in New Issue
Block a user