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)
|
||||
{
|
||||
|
||||
net.procA[i]->modVarRecurseFl = true;
|
||||
|
||||
// Call notify() on all variables marked for notification that have changed since the last exec_cycle()
|
||||
proc_notify(net.procA[i], kCallbackPnFl | kQuietPnFl);
|
||||
|
||||
@ -3663,6 +3666,9 @@ cw::rc_t cw::flow::exec_cycle( network_t& net )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
net.procA[i]->modVarRecurseFl = false;
|
||||
|
||||
}
|
||||
|
||||
return halt_fl ? ((unsigned)kEofRC) : rc;
|
||||
|
@ -164,7 +164,7 @@ namespace cw
|
||||
rc_t _mod_var_map_update( variable_t* var )
|
||||
{
|
||||
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
|
||||
// (use acquire to prevent rd/wr from moving before this op)
|
||||
@ -794,7 +794,6 @@ errLabel:
|
||||
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;
|
||||
const object_t* var_cfg;
|
||||
|
||||
fl_ref = false;
|
||||
|
||||
|
@ -151,6 +151,7 @@ namespace cw
|
||||
unsigned varMapN; // varMapN = varMapIdN * varMapChN
|
||||
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 ]
|
||||
unsigned modVarMapN; // modVarMapN == varMapN
|
||||
unsigned modVarMapTailIdx; // index of next full slot in varMapA[]
|
||||
|
Loading…
Reference in New Issue
Block a user