< prev index next >

src/hotspot/share/utilities/lockFreeStack.hpp

Print this page

        

@@ -101,11 +101,11 @@
 
   // Atomically exchange the list of elements with NULL, returning the old
   // list of elements.  Acts as a full memory barrier.
   // postcondition: empty()
   T* pop_all() {
-    return Atomic::xchg((T*)NULL, &_top);
+    return Atomic::xchg(&_top, (T*)NULL);
   }
 
   // Atomically adds value to the top of this stack.  Acts as a full
   // memory barrier.
   void push(T& value) {
< prev index next >