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