Skip to content

Commit 7b8de74

Browse files
Abseil Teamcopybara-github
Abseil Team
authored andcommitted
Add a comment about the layout of the fields in ThreadIdentity
PiperOrigin-RevId: 498179140 Change-Id: Ie18b68e6313817b4f41fec6b10dd878436431730
1 parent de6fca2 commit 7b8de74

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

absl/base/internal/thread_identity.h

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ struct PerThreadSynch {
134134

135135
// The instances of this class are allocated in NewThreadIdentity() with an
136136
// alignment of PerThreadSynch::kAlignment.
137+
//
138+
// NOTE: The layout of fields in this structure is critical, please do not
139+
// add, remove, or modify the field placements without fully auditing the
140+
// layout.
137141
struct ThreadIdentity {
138142
// Must be the first member. The Mutex implementation requires that
139143
// the PerThreadSynch object associated with each thread is

0 commit comments

Comments
 (0)