1add_entrypoint_object( 2 call_once 3 SRCS 4 call_once.cpp 5 HDRS 6 ../call_once.h 7 DEPENDS 8 .threads_utils 9 libc.include.sys_syscall 10 libc.include.threads 11 libc.src.__support.CPP.atomic 12 libc.src.__support.OSUtil.osutil 13) 14 15add_header_library( 16 threads_utils 17 HDRS 18 CndVar.h 19 Futex.h 20 Thread.h 21 DEPENDS 22 libc.include.sys_syscall 23 libc.include.threads 24 libc.src.__support.CPP.atomic 25 libc.src.__support.OSUtil.osutil 26 libc.src.__support.threads.mutex 27) 28 29add_entrypoint_object( 30 thrd_create 31 SRCS 32 thrd_create.cpp 33 HDRS 34 ../thrd_create.h 35 DEPENDS 36 .threads_utils 37 libc.include.errno 38 libc.include.sys_mman 39 libc.include.sys_syscall 40 libc.include.threads 41 libc.src.__support.common 42 libc.src.__support.OSUtil.osutil 43 COMPILE_OPTIONS 44 -O3 45 -fno-omit-frame-pointer # This allows us to sniff out the thread args from 46 # the new thread's stack reliably. 47) 48 49add_entrypoint_object( 50 thrd_join 51 SRCS 52 thrd_join.cpp 53 HDRS 54 ../thrd_join.h 55 DEPENDS 56 .threads_utils 57 libc.include.sys_syscall 58 libc.include.threads 59 libc.src.__support.CPP.atomic 60 libc.src.__support.common 61 libc.src.__support.OSUtil.osutil 62) 63 64add_entrypoint_object( 65 cnd_init 66 SRCS 67 cnd_init.cpp 68 HDRS 69 ../cnd_init.h 70 DEPENDS 71 .threads_utils 72 libc.include.threads 73) 74 75add_entrypoint_object( 76 cnd_destroy 77 SRCS 78 cnd_destroy.cpp 79 HDRS 80 ../cnd_destroy.h 81 DEPENDS 82 .threads_utils 83 libc.include.threads 84) 85 86add_entrypoint_object( 87 cnd_wait 88 SRCS 89 cnd_wait.cpp 90 HDRS 91 ../cnd_wait.h 92 DEPENDS 93 .threads_utils 94 libc.include.threads 95 libc.src.__support.threads.mutex 96) 97 98add_entrypoint_object( 99 cnd_signal 100 SRCS 101 cnd_signal.cpp 102 HDRS 103 ../cnd_signal.h 104 DEPENDS 105 .threads_utils 106 libc.include.threads 107) 108 109add_entrypoint_object( 110 cnd_broadcast 111 SRCS 112 cnd_broadcast.cpp 113 HDRS 114 ../cnd_broadcast.h 115 DEPENDS 116 .threads_utils 117 libc.include.threads 118) 119