[all-commits] [llvm/llvm-project] 301db3: [libc] add simplified tid cache (#101620)

Schrodinger ZHU Yifan via All-commits all-commits at lists.llvm.org
Fri Aug 2 10:28:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 301db3dee53b5afbc9813c5fcd3cce25a0655f5f
      https://github.com/llvm/llvm-project/commit/301db3dee53b5afbc9813c5fcd3cce25a0655f5f
  Author: Schrodinger ZHU Yifan <yifanzhu at rochester.edu>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/riscv/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/newhdrgen/yaml/unistd.yaml
    M libc/spec/posix.td
    M libc/src/__support/threads/CMakeLists.txt
    A libc/src/__support/threads/identifier.h
    M libc/src/__support/threads/linux/CMakeLists.txt
    M libc/src/__support/threads/linux/rwlock.h
    M libc/src/unistd/CMakeLists.txt
    A libc/src/unistd/gettid.cpp
    A libc/src/unistd/gettid.h
    M libc/src/unistd/linux/CMakeLists.txt
    M libc/src/unistd/linux/fork.cpp
    M libc/test/integration/src/unistd/CMakeLists.txt
    M libc/test/integration/src/unistd/fork_test.cpp

  Log Message:
  -----------
  [libc] add simplified tid cache (#101620)

According to discussions on monthly meeting, we probably don't want to
cache `getpid` anymore. glibc removes their cache. bionic is hesitating
whether such cache is to be removed. `getpid` is async-signal-safe, so
we must make sure it always work.

However, for `gettid`, we have more freedom. Moreover, we are using
`gettid` to examine deadlock such that the performance penalty is not
negligible here. Thus, this patch is separated from previous patch to
provide only `tid` caching. It is much more simplified. Hopefully,
previous build issues can be resolved easily.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list