Add functions ngSpice_LockRealloc and ngSpice_UnlockRealloc
to lock reallocing output vectors, e.g. during reading the vecs for plotting.
This commit is contained in:
parent
e87651e27f
commit
1849a8d220
|
|
@ -775,6 +775,8 @@ read_initialisation_file(const char *dir, const char *name)
|
||||||
/* The functions exported explicitely from shared ngspice */
|
/* The functions exported explicitely from shared ngspice */
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef THREADS
|
#ifdef THREADS
|
||||||
|
|
||||||
/* Checks if ngspice is running in the background */
|
/* Checks if ngspice is running in the background */
|
||||||
|
|
@ -1337,6 +1339,20 @@ char** ngSpice_AllEvtNodes(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Lock/unlock realloc of result vectors during plotting */
|
||||||
|
IMPEXP
|
||||||
|
int ngSpice_LockRealloc(void)
|
||||||
|
{
|
||||||
|
mutex_lock(&vecreallocMutex);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPEXP
|
||||||
|
int ngSpice_UnlockRealloc(void)
|
||||||
|
{
|
||||||
|
mutex_unlock(&vecreallocMutex);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* add the preliminary breakpoints to the list.
|
/* add the preliminary breakpoints to the list.
|
||||||
called from dctran.c */
|
called from dctran.c */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue