diff options
author | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 23:45:42 +0000 |
---|---|---|
committer | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 23:45:42 +0000 |
commit | 9b4e48567194b6b15b68c6ea78323b7cb1fc6691 (patch) | |
tree | 803f55638005c5547011fe54e4030d6a5ba9bd6f /libitm | |
parent | 16cd83025fa0a794e4beec3647be492f08fe2d72 (diff) | |
download | gcc-9b4e48567194b6b15b68c6ea78323b7cb1fc6691.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm')
-rw-r--r-- | libitm/ChangeLog | 6 | ||||
-rw-r--r-- | libitm/containers.h | 1 | ||||
-rw-r--r-- | libitm/local.cc | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog index 8efaef5f329..ad07098d326 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,5 +1,11 @@ 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> + PR libitm/51855 * config/generic/tls.h (GTM::mask_stack_top): New. (GTM::mask_stack_bottom): Declare. diff --git a/libitm/containers.h b/libitm/containers.h index 394b6f2508e..36905659da2 100644 --- a/libitm/containers.h +++ b/libitm/containers.h @@ -92,6 +92,7 @@ class vector size_t size() const { return m_size; } size_t capacity() const { return this->capacity; } + void set_size (size_t size) { m_size = size; } void clear() { m_size = 0; } iterator push() { diff --git a/libitm/local.cc b/libitm/local.cc index 5645a12bab8..d0d96cea625 100644 --- a/libitm/local.cc +++ b/libitm/local.cc @@ -61,6 +61,7 @@ gtm_undolog::rollback (gtm_thread* tx, size_t until_size) if (likely(ptr > top || (uint8_t*)ptr + len <= bot)) __builtin_memcpy (ptr, &undolog[i], len); } + undolog.set_size(until_size); } } |