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.
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.
- is blocked by
-
JDK-8367013 Add Atomic<T> to package/replace idiom of volatile var plus AtomicAccess:: operations
-
- Resolved
-
- links to
-
Review(master)
openjdk/jdk/28329