Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions sources/dollar.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,11 @@ NoChangeOne:;
}
/*
Now the real evaluation.
In the case of threads and MODSUM this requires an immediate lock.
Otherwise the lock could be placed later.
We need to lock here before we work out the RHS, in case the RHS itself
depends on the dollar variable.
*/
#ifdef WITHPTHREADS
if ( dtype == MODSUM ) {
/* LOCK(d->pthreadslockwrite); */
LOCK(d->pthreadslockread);
}
LOCK(d->pthreadslockread);
#endif
CleanDollarFactors(d);
/*
Expand Down Expand Up @@ -445,12 +442,7 @@ NoChangeOne:;
}
numterms = 0; t = ss; while ( *t ) { numterms++; t += *t; }
}
#ifdef WITHPTHREADS
if ( dtype != MODSUM ) {
/* LOCK(d->pthreadslockwrite); */
LOCK(d->pthreadslockread);
}
#endif

if ( numterms == 0 ) {
/*
the new value evaluates to zero
Expand Down
Loading