[all-commits] [llvm/llvm-project] bf447e: [llvm/Support] Make `llvm::sys::RWMutex` Lockable ...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Wed May 1 15:32:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf447e27d2ac7a81ea714ceca932eecaac6db77b
      https://github.com/llvm/llvm-project/commit/bf447e27d2ac7a81ea714ceca932eecaac6db77b
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
    M llvm/include/llvm/Support/RWMutex.h
    M llvm/lib/Support/RWMutex.cpp

  Log Message:
  -----------
  [llvm/Support] Make `llvm::sys::RWMutex` Lockable (#90667)

This patch extends the `llvm::sys::RWMutex` class to fullfill the
`Lockable` requirement to include attempted locking, by implementing a
`bool try_lock` member function.

As the name suggests, this method will try to acquire to lock in a
non-blocking fashion and release it immediately. If it managed to
acquire the lock, returns `true`, otherwise returns `false`.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>



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