07b6642b93
PR libitm/51855 * config/generic/tls.h (GTM::mask_stack_top): New. (GTM::mask_stack_bottom): Declare. * config/generic/tls.c (GTM::mask_stack_bottom): New. * local.cc (gtm_undolog::rollback): Filter out any updates that overlap the libitm stack. Add current transaction as parameter. * libitm_i.h (GTM::gtm_undolog::rollback): Adapt. * beginend.cc (GTM::gtm_thread::rollback): Adapt. * testsuite/libitm.c/stackundo.c: New test. From-SVN: r183172
24 lines
308 B
C
24 lines
308 B
C
int __attribute__((noinline)) test2(int x[1000])
|
|
{
|
|
int i;
|
|
return x[12];
|
|
}
|
|
|
|
int __attribute__((noinline)) test1()
|
|
{
|
|
int x[1000], i;
|
|
|
|
for (i = 0; i < 1000; i++)
|
|
x[i] = i;
|
|
return test2(x);
|
|
}
|
|
|
|
int main()
|
|
{
|
|
__transaction_atomic {
|
|
if (test1() !=0)
|
|
__transaction_cancel;
|
|
}
|
|
return 0;
|
|
}
|