Browse Source

inp.c, add variable 'controlswait'. If set, only then controls with

shared ngspice are executed after background thread has finished.
pre-master-46
Holger Vogt 7 years ago
parent
commit
9d9f415226
  1. 10
      src/frontend/inp.c

10
src/frontend/inp.c

@ -947,12 +947,18 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
of commands. Thus this is delegated to a function using a third thread, that of commands. Thus this is delegated to a function using a third thread, that
only start when the background threas has finished (sharedspice.c).*/ only start when the background threas has finished (sharedspice.c).*/
#ifdef SHARED_MODULE #ifdef SHARED_MODULE
exec_controls(controls);
for (wl = controls; wl; wl = wl->wl_next)
if (cp_getvar("controlswait", CP_BOOL, NULL, 0)) {
exec_controls(wl_copy(wl));
break;
}
else
cp_evloop(wl->wl_word);
#else #else
for (wl = controls; wl; wl = wl->wl_next) for (wl = controls; wl; wl = wl->wl_next)
cp_evloop(wl->wl_word); cp_evloop(wl->wl_word);
wl_free(controls);
#endif #endif
wl_free(controls);
} }
/* Now reset everything. Pop the control stack, and fix up the IO /* Now reset everything. Pop the control stack, and fix up the IO

Loading…
Cancel
Save