Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4124

Clean Up Internal Atomic APIs

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 1.20.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The library only defines a single atomic API for adding to a 32-bit and 64-bit integers, but includes a lot of complex preprocessor logic to detect platforms that are probably not relevant to the library, and are likely untested. There is a lack of atomic exchange, atomic compare-exchange, atomic fetch. Atomic fetch, in particular, is useful for read operations on integral variables that may be modified concurrently, without the need to introduce a lock (relevant to CDRIVER-4114).

      The pending solution for CDRIVER-4113 also makes use of these additional atomic operations.

            Assignee:
            colby.pike@mongodb.com Colby Pike
            Reporter:
            colby.pike@mongodb.com Colby Pike
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: