Update LockFreeStack for Atomic<T>

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: hotspot
    • None

      LockFreeStack has a _top member that should be converted to use Atomic<T> instead of volatile.

      LockFreeStack also requires the element type provide a "next" member for use by the linked-list representation of the stack. An element type provides LockFreeStack with access to this member through a function that is a template parameter of LockFreeStack.

      Currently that function is required to return a volatile pointer and LockFreeStack uses AtomicAccess to manipulate it. With the advent of Atomic<T> we want it to instead use that API. But in the interest of not requiring all clients to convert to Atomic<T> simultaneously, LockFreeStack should, for now, support both forms, selected by the signature of the "next" access function.

            Assignee:
            Kim Barrett
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: