blob: 03e62664d80ca37511169c3b01168e6c02898b36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* Verify that we can look up tm clone of transaction_callable
and transaction_pure. */
#include <stdlib.h>
#include <libitm.h>
static int x;
int __attribute__((transaction_pure)) pure(int i)
{
return i+2;
}
int __attribute__((transaction_callable)) callable(void)
{
return ++x;
}
int main()
{
if (_ITM_getTMCloneSafe (&pure) != &pure)
abort ();
if (_ITM_getTMCloneSafe (&callable) == NULL)
abort ();
return 0;
}
|