This source file includes following definitions.
- test_fork
- main
1
2
3
4
5
6
7
8
9
10
11 #include <errno.h>
12 #include <inttypes.h>
13 #include <pthread.h>
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include <unistd.h>
17
18 #include "utils.h"
19 #include "tm.h"
20
21 int test_fork(void)
22 {
23 SKIP_IF(!have_htm());
24
25 asm __volatile__(
26 "tbegin.;"
27 "blt 1f; "
28 "li 0, 2;"
29 "sc ;"
30 "tend.;"
31 "1: ;"
32 : : : "memory", "r0");
33
34
35
36 return 0;
37 }
38
39 int main(int argc, char *argv[])
40 {
41 return test_harness(test_fork, "tm_fork");
42 }