[libc] Add implemementations of thread specific data related API.
authorSiva Chandra Reddy <sivachandra@google.com>
Tue, 9 Aug 2022 20:40:53 +0000 (20:40 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 12 Aug 2022 05:28:40 +0000 (05:28 +0000)
commit4a738ee8220e02df62b7b43d3fe5b2d6be88c482
treeb438daf6c0eda2be89eaad9c2dce97a073df05d0
parent12e1936f64f8739889dafffd17c826526ce4da5e
[libc] Add implemementations of thread specific data related API.

Specifically, POSIX functions pthread_key_create, pthread_key_delete,
pthread_setspecific and pthread_getspecific have been added. The C
standard equivalents tss_create, tss_delete, tss_set and tss_get have
also been added.

Reviewed By: lntue, michaelrj

Differential Revision: https://reviews.llvm.org/D131647
35 files changed:
libc/config/linux/api.td
libc/config/linux/x86_64/entrypoints.txt
libc/include/CMakeLists.txt
libc/include/llvm-libc-types/CMakeLists.txt
libc/include/llvm-libc-types/__pthread_tss_dtor_t.h [new file with mode: 0644]
libc/include/llvm-libc-types/pthread_key_t.h [new file with mode: 0644]
libc/include/llvm-libc-types/tss_dtor_t.h [new file with mode: 0644]
libc/include/llvm-libc-types/tss_t.h [new file with mode: 0644]
libc/spec/posix.td
libc/spec/stdc.td
libc/src/__support/threads/CMakeLists.txt
libc/src/__support/threads/thread.cpp
libc/src/__support/threads/thread.h
libc/src/pthread/CMakeLists.txt
libc/src/pthread/pthread_getspecific.cpp [new file with mode: 0644]
libc/src/pthread/pthread_getspecific.h [new file with mode: 0644]
libc/src/pthread/pthread_key_create.cpp [new file with mode: 0644]
libc/src/pthread/pthread_key_create.h [new file with mode: 0644]
libc/src/pthread/pthread_key_delete.cpp [new file with mode: 0644]
libc/src/pthread/pthread_key_delete.h [new file with mode: 0644]
libc/src/pthread/pthread_setspecific.cpp [new file with mode: 0644]
libc/src/pthread/pthread_setspecific.h [new file with mode: 0644]
libc/src/threads/CMakeLists.txt
libc/src/threads/tss_create.cpp [new file with mode: 0644]
libc/src/threads/tss_create.h [new file with mode: 0644]
libc/src/threads/tss_delete.cpp [new file with mode: 0644]
libc/src/threads/tss_delete.h [new file with mode: 0644]
libc/src/threads/tss_get.cpp [new file with mode: 0644]
libc/src/threads/tss_get.h [new file with mode: 0644]
libc/src/threads/tss_set.cpp [new file with mode: 0644]
libc/src/threads/tss_set.h [new file with mode: 0644]
libc/test/integration/src/pthread/CMakeLists.txt
libc/test/integration/src/pthread/pthread_tss_test.cpp [new file with mode: 0644]
libc/test/integration/src/threads/CMakeLists.txt
libc/test/integration/src/threads/tss_test.cpp [new file with mode: 0644]