zephyr/lib/posix/CMakeLists.txt
Niranjhana N 414c39fc94 posix: add pthread_key and pthread_once APIs
Added 4 new pthread_key APIs for thread-specific data
key creation, deletion, setting and getting the values.

Added a key list to the posix_struct for threads.

Added pthread_once API.

Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-07-19 08:46:33 -04:00

24 lines
781 B
CMake

add_library(PTHREAD INTERFACE)
target_include_directories(PTHREAD INTERFACE ${ZEPHYR_BASE}/include/posix)
zephyr_library()
zephyr_library_sources(pthread_common.c)
zephyr_library_sources(pthread_cond.c)
zephyr_library_sources(pthread_mutex.c)
zephyr_library_sources(pthread_barrier.c)
zephyr_library_sources(pthread.c)
zephyr_library_sources(pthread_sched.c)
zephyr_library_sources(clock.c)
zephyr_library_sources(sleep.c)
zephyr_library_sources(timer.c)
zephyr_library_sources(pthread_rwlock.c)
zephyr_library_sources(semaphore.c)
zephyr_library_sources(pthread_key.c)
zephyr_library_sources_ifdef(CONFIG_POSIX_MQUEUE mqueue.c)
zephyr_library_sources_ifdef(CONFIG_POSIX_FS fs.c)
zephyr_library_link_libraries(PTHREAD)
target_link_libraries(PTHREAD INTERFACE zephyr_interface)