From 7b8de741d3c4d42dce8bd0d92295a582564333fb Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 28 Dec 2022 07:31:19 -0800 Subject: Add a comment about the layout of the fields in ThreadIdentity PiperOrigin-RevId: 498179140 Change-Id: Ie18b68e6313817b4f41fec6b10dd878436431730 --- absl/base/internal/thread_identity.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'absl/base') 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 -- cgit v1.2.3