libitm: Truncate undo log after rolling back.
libitm/ * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after rolling back. * containers.h (GTM::vector::set_size): New. From-SVN: r183173
This commit is contained in:
parent
07b6642b93
commit
aab74ee9d4
@ -1,3 +1,9 @@
|
|||||||
|
2012-01-14 Torvald Riegel <triegel@redhat.com>
|
||||||
|
|
||||||
|
* local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
|
||||||
|
rolling back.
|
||||||
|
* containers.h (GTM::vector::set_size): New.
|
||||||
|
|
||||||
2012-01-14 Torvald Riegel <triegel@redhat.com>
|
2012-01-14 Torvald Riegel <triegel@redhat.com>
|
||||||
|
|
||||||
PR libitm/51855
|
PR libitm/51855
|
||||||
|
@ -92,6 +92,7 @@ class vector
|
|||||||
size_t size() const { return m_size; }
|
size_t size() const { return m_size; }
|
||||||
size_t capacity() const { return this->capacity; }
|
size_t capacity() const { return this->capacity; }
|
||||||
|
|
||||||
|
void set_size (size_t size) { m_size = size; }
|
||||||
void clear() { m_size = 0; }
|
void clear() { m_size = 0; }
|
||||||
|
|
||||||
iterator push() {
|
iterator push() {
|
||||||
|
@ -61,6 +61,7 @@ gtm_undolog::rollback (gtm_thread* tx, size_t until_size)
|
|||||||
if (likely(ptr > top || (uint8_t*)ptr + len <= bot))
|
if (likely(ptr > top || (uint8_t*)ptr + len <= bot))
|
||||||
__builtin_memcpy (ptr, &undolog[i], len);
|
__builtin_memcpy (ptr, &undolog[i], len);
|
||||||
}
|
}
|
||||||
|
undolog.set_size(until_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user