OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libitm/] [testsuite/] [libitm.c/] [clone-1.c] - Blame information for rev 737

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.