CMakeLists.txt
1.83 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
add_gen_header(
thread_start_args_h
DEF_FILE thread_start_args.h.def
GEN_HDR thread_start_args.h
PARAMS
thread_start_args=${LIBC_TARGET_MACHINE}/thread_start_args.h.in
DATA_FILES
${LIBC_TARGET_MACHINE}/thread_start_args.h.in
)
add_entrypoint_object(
call_once
SRCS
call_once.cpp
HDRS
../call_once.h
DEPENDS
.threads_utils
libc.config.linux.linux_syscall_h
libc.include.sys_syscall
libc.include.threads
)
add_header_library(
threads_utils
HDRS
thread_utils.h
DEPENDS
.thread_start_args_h
)
add_entrypoint_object(
thrd_create
SRCS
thrd_create.cpp
HDRS
../thrd_create.h
DEPENDS
.threads_utils
libc.config.linux.linux_syscall_h
libc.include.errno
libc.include.sys_syscall
libc.include.threads
libc.src.__support.common
libc.src.errno.__errno_location
libc.src.sys.mman.mmap
COMPILE_OPTIONS
-fno-omit-frame-pointer # This allows us to sniff out the thread args from
# the new thread's stack reliably.
)
add_entrypoint_object(
thrd_join
SRCS
thrd_join.cpp
HDRS
../thrd_join.h
DEPENDS
.threads_utils
libc.config.linux.linux_syscall_h
libc.include.sys_syscall
libc.include.threads
libc.src.sys.mman.munmap
libc.src.__support.common
)
add_entrypoint_object(
mtx_init
SRCS
mtx_init.cpp
HDRS
../mtx_init.h
DEPENDS
.threads_utils
libc.include.threads
)
add_entrypoint_object(
mtx_lock
SRCS
mtx_lock.cpp
HDRS
../mtx_lock.h
DEPENDS
.threads_utils
libc.config.linux.linux_syscall_h
libc.include.sys_syscall
libc.include.threads
)
add_entrypoint_object(
mtx_unlock
SRCS
mtx_unlock.cpp
HDRS
../mtx_unlock.h
DEPENDS
.threads_utils
libc.config.linux.linux_syscall_h
libc.include.sys_syscall
libc.include.threads
)