[all-commits] [llvm/llvm-project] 113725: [libc] Add a class "Atomic" as a simple equivalent...

Siva Chandra via All-commits all-commits at lists.llvm.org
Mon Feb 28 15:52:10 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11372555850fe782b81dc419fbb09e6fc718c94d
      https://github.com/llvm/llvm-project/commit/11372555850fe782b81dc419fbb09e6fc718c94d
  Author: Siva Chandra Reddy <sivachandra at google.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M libc/include/__llvm-libc-common.h
    M libc/include/llvm-libc-types/cnd_t.h
    M libc/include/llvm-libc-types/mtx_t.h
    M libc/src/__support/CPP/CMakeLists.txt
    A libc/src/__support/CPP/atomic.h
    M libc/src/threads/linux/CMakeLists.txt
    M libc/src/threads/linux/CndVar.h
    M libc/src/threads/linux/Mutex.h
    M libc/test/src/__support/CPP/CMakeLists.txt
    A libc/test/src/__support/CPP/atomic_test.cpp

  Log Message:
  -----------
  [libc] Add a class "Atomic" as a simple equivalent of std::atomic.

Only the methods currently required by the libc have been added.
Most of the existing uses of atomic operations have been switched over
to this new class. A future change will clean up the rest of uses.

This change now allows building mutex and condition variable code with a
C++ compiler which does not have stdatomic.h, for example g++.

Reviewed By: lntue

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




More information about the All-commits mailing list