[libc] move fork into threads folder
authorMichael Jones <michaelrj@google.com>
Fri, 11 Nov 2022 21:50:01 +0000 (13:50 -0800)
committerMichael Jones <michaelrj@google.com>
Sat, 12 Nov 2022 00:01:39 +0000 (16:01 -0800)
commit4d25761b076d19c237890ad7b7331d01bd3a84b6
treef10852fc554e0b0768822aa18fafebbdae82f97d
parente7707464a3f7bf0c6011809d80d0a6e525be184b
[libc] move fork into threads folder

Fork, as a thread function, should go in the threads folder.
Additionally, it depends on the thread mutex, and it was causing build
issues for targets where we don't support threads.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D137867
libc/src/__support/CMakeLists.txt
libc/src/__support/threads/CMakeLists.txt
libc/src/__support/threads/fork_callbacks.cpp [moved from libc/src/__support/fork_callbacks.cpp with 100% similarity]
libc/src/__support/threads/fork_callbacks.h [moved from libc/src/__support/fork_callbacks.h with 80% similarity]
libc/src/pthread/CMakeLists.txt
libc/src/pthread/pthread_atfork.cpp
libc/src/unistd/linux/CMakeLists.txt
libc/src/unistd/linux/fork.cpp