PR-786 Fix not resetting the has pending flag

This commit is contained in:
Garret Fick 2019-11-19 14:56:53 -05:00
parent 284a2650f9
commit 303d641b86
No known key found for this signature in database
GPG Key ID: A1BBEF9D2AB249C6
1 changed files with 2 additions and 0 deletions

View File

@ -147,6 +147,7 @@ void exchange(array<PendingValue<T>, NUM_REGISTER_VALUES>& write_buffer,
// value to the read buffer.
if (write_buffer[index].has_pending) {
*read_buffer[index].value = write_buffer[index].value;
write_buffer[index].has_pending = false;
}
// Finally, update our cached value so that we can read the value
@ -167,6 +168,7 @@ void IndexedStrategy::Exchange() {
// writes to those.
for (size_t index = 0; index < coil_write_buffer.size(); ++index) {
if (coil_write_buffer[index].has_pending) {
coil_write_buffer[index].has_pending = false;
*coil_read_buffer[index].value = coil_write_buffer[index].value;
}
coil_read_buffer[index].update_cache();