Skip to content

Commit

Permalink
[Chapter8] Section about alignment: minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
dendibakh committed Mar 15, 2024
1 parent 96a773b commit f5a474c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ Listing: Data padding to avoid false sharing.
~~~~ {#lst:PadFalseSharing .cpp}
#define CACHELINE_ALIGN alignas(64)
struct S { struct S {
int a; // written by thread A => int a;
int b; // written by thread B CACHELINE_ALIGN int b;
int a; /* modified by thread A */ => int a;
int b; /* modified by thread B */ CACHELINE_ALIGN int b;
}; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit f5a474c

Please sign in to comment.