[all-commits] [llvm/llvm-project] 6a4054: sanitizer_common: add Semaphore

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Fri Jul 16 10:34:39 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a4054ef060ba9cd6fac1b68f226f5b142f0a543
      https://github.com/llvm/llvm-project/commit/6a4054ef060ba9cd6fac1b68f226f5b142f0a543
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-07-16 (Fri, 16 Jul 2021)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/CMakeLists.txt
    M compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
    A compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_mutex.h
    M compiler-rt/lib/sanitizer_common/sanitizer_solaris.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
    M compiler-rt/lib/sanitizer_common/tests/sanitizer_mutex_test.cpp
    M compiler-rt/lib/tsan/go/build.bat
    M compiler-rt/lib/tsan/go/buildgo.sh

  Log Message:
  -----------
  sanitizer_common: add Semaphore

Semaphore is a portable way to park/unpark threads.
The plan is to use it to implement a portable blocking
mutex in subsequent changes. Semaphore can also be used
to efficiently wait for other things (e.g. we currently
spin to synchronize thread creation and start).

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D106071




More information about the All-commits mailing list