#2832: possible race condition in LoopControl
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:major
Component:

Comment (by Erik Schnetter):

As you say, your padding doesn’t actually align the struct. The struct may thus be split across two cache lines. Since some architectures have 128-byte cache lines, you should instead pad to 2*128 bytes. (Intel CPUs have 64-byte cache lines and thus 128 bytes suffice there.)

You can instead also check the alignment (see https://en.cppreference.com/w/c/language/_Alignof) with a static assertion.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2832/possible-race-condition-in-loopcontrol