summaryrefslogtreecommitdiff
path: root/absl/base/internal/thread_identity.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2022-12-28 07:31:19 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2022-12-28 07:32:00 -0800
commit7b8de741d3c4d42dce8bd0d92295a582564333fb (patch)
treec8963590b7ab462332f94feae8137d7b2cd1e9e5 /absl/base/internal/thread_identity.h
parentde6fca2110e7bf6ef812b9064bf302a29ae1fbc7 (diff)
Add a comment about the layout of the fields in ThreadIdentity
PiperOrigin-RevId: 498179140 Change-Id: Ie18b68e6313817b4f41fec6b10dd878436431730
Diffstat (limited to 'absl/base/internal/thread_identity.h')
-rw-r--r--absl/base/internal/thread_identity.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/base/internal/thread_identity.h b/absl/base/internal/thread_identity.h
index 659694b3..463acbc7 100644
--- a/absl/base/internal/thread_identity.h
+++ b/absl/base/internal/thread_identity.h
@@ -134,6 +134,10 @@ struct PerThreadSynch {
// The instances of this class are allocated in NewThreadIdentity() with an
// alignment of PerThreadSynch::kAlignment.
+//
+// NOTE: The layout of fields in this structure is critical, please do not
+// add, remove, or modify the field placements without fully auditing the
+// layout.
struct ThreadIdentity {
// Must be the first member. The Mutex implementation requires that
// the PerThreadSynch object associated with each thread is