diff options
author | Torvald Riegel <triegel@redhat.com> | 2015-11-22 20:56:20 +0000 |
---|---|---|
committer | Torvald Riegel <torvald@gcc.gnu.org> | 2015-11-22 20:56:20 +0000 |
commit | 4f8a3b87f948d472c2aeb1bc9177892c8fc6f113 (patch) | |
tree | dbf9990236cbe2cf507d8aa797ca2aaede516f99 /libitm/libitm_i.h | |
parent | 9b22c1b69ad455177317dd945a5f0d0c5e43d58c (diff) | |
download | gcc-4f8a3b87f948d472c2aeb1bc9177892c8fc6f113.zip gcc-4f8a3b87f948d472c2aeb1bc9177892c8fc6f113.tar.gz gcc-4f8a3b87f948d472c2aeb1bc9177892c8fc6f113.tar.bz2 |
libitm: Fix recent changes to allocations log.
libitm/
* libitm_i.h (gtm_alloc_action): Remove union.
* testsuite/libitm.c/alloc-1.c: New.
From-SVN: r230727
Diffstat (limited to 'libitm/libitm_i.h')
-rw-r--r-- | libitm/libitm_i.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h index f01a1ab..4b72348 100644 --- a/libitm/libitm_i.h +++ b/libitm/libitm_i.h @@ -106,12 +106,10 @@ namespace GTM HIDDEN { // the template used inside gtm_thread can instantiate. struct gtm_alloc_action { - // Iff free_fn_sz is nonzero, it must be used instead of free_fn. - union - { - void (*free_fn)(void *); - void (*free_fn_sz)(void *, size_t); - }; + // Iff free_fn_sz is nonzero, it must be used instead of free_fn, and vice + // versa. + void (*free_fn)(void *); + void (*free_fn_sz)(void *, size_t); size_t sz; // If true, this is an allocation; we discard the log entry on outermost // commit, and deallocate on abort. If false, this is a deallocation and |