Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2536

Convert shared fields to use C11 atomic types

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      WiredTiger relies on certain operations being atomic. In particular, we perform loads and stores to integers up to sizeof(intptr_t) and rely on not getting torn reads.

      We should investigate using the C11 standard atomic types for such shared data:

      http://en.cppreference.com/w/c/atomic

      Most usage is straightforward, but (among other things), simple increments cause a compiler warning, forcing the use of atomic_fetch_add, which would have avoided WT-2534.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: