1add_gen_header(
2  thread_start_args_h
3  DEF_FILE thread_start_args.h.def
4  GEN_HDR thread_start_args.h
5  PARAMS
6    thread_start_args=${LIBC_TARGET_MACHINE}/thread_start_args.h.in
7  DATA_FILES
8    ${LIBC_TARGET_MACHINE}/thread_start_args.h.in
9)
10
11add_header_library(
12  threads_utils
13  HDRS
14    thread_utils.h
15  DEPENDS
16    thread_start_args_h
17)
18
19add_entrypoint_object(
20  thrd_create
21  SRCS
22    thrd_create.cpp
23  HDRS
24    ../thrd_create.h
25  DEPENDS
26    errno_h
27    linux_syscall_h
28    mmap
29    support_common_h
30    sys_syscall_h
31    threads_h
32    threads_utils
33    __errno_location
34  COMPILE_OPTIONS
35    -fno-omit-frame-pointer # This allows us to sniff out the thread args from
36                            # the new thread's stack reliably.
37)
38
39add_entrypoint_object(
40  thrd_join
41  SRCS
42    thrd_join.cpp
43  HDRS
44    ../thrd_join.h
45  DEPENDS
46    linux_syscall_h
47    munmap
48    support_common_h
49    sys_syscall_h
50    threads_h
51    threads_utils
52)
53
54add_entrypoint_object(
55  mtx_init
56  SRCS
57    mtx_init.cpp
58  HDRS
59    ../mtx_init.h
60  DEPENDS
61    threads_h
62    threads_utils
63)
64
65add_entrypoint_object(
66  mtx_lock
67  SRCS
68    mtx_lock.cpp
69  HDRS
70    ../mtx_lock.h
71  DEPENDS
72    linux_syscall_h
73    sys_syscall_h
74    threads_h
75    threads_utils
76)
77
78add_entrypoint_object(
79  mtx_unlock
80  SRCS
81    mtx_unlock.cpp
82  HDRS
83    ../mtx_unlock.h
84  DEPENDS
85    linux_syscall_h
86    sys_syscall_h
87    threads_h
88    threads_utils
89)
90