Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Whitespace is evil, in this case.

When accessing a bit-field, a thread may inadvertently access a separate bit-field in adjacent memory. This is because compilers are required to store multiple adjacent bit-fields in one storage unit whenever they fit. Consequently, data races may exist not just on a bit-field accessed by multiple threads but also on other bit-fields sharing the same byte or word.  The The problem is difficult to diagnose because it may not be obvious that the same memory location is being modified by multiple threads.

...