Reformulate documentation of ABSL_LOCKS_EXCLUDED.

The intent of the macro is to say what locks cannot be held when calling the method, not making a promise that they will be acquired.

PiperOrigin-RevId: 454158686
Change-Id: I71087460c3df27c7d6e0571156f19f525024f1de
pull/1197/head
Abseil Team 2 years ago committed by Copybara-Service
parent db60907587
commit 45eba9c16a
  1. 4
      absl/base/thread_annotations.h

@ -154,8 +154,8 @@
// ABSL_LOCKS_EXCLUDED()
//
// Documents the locks acquired in the body of the function. These locks
// cannot be held when calling this function (as Abseil's `Mutex` locks are
// Documents the locks that cannot be held by callers of this function, as they
// might be acquired by this function (Abseil's `Mutex` locks are
// non-reentrant).
#if ABSL_HAVE_ATTRIBUTE(locks_excluded)
#define ABSL_LOCKS_EXCLUDED(...) __attribute__((locks_excluded(__VA_ARGS__)))

Loading…
Cancel
Save