1.1 --- a/src/share/vm/utilities/taskqueue.hpp Wed Sep 25 17:47:51 2013 +0200 1.2 +++ b/src/share/vm/utilities/taskqueue.hpp Thu Sep 26 10:25:02 2013 -0400 1.3 @@ -322,11 +322,11 @@ 1.4 // Attempts to claim a task from the "local" end of the queue (the most 1.5 // recently pushed). If successful, returns true and sets t to the task; 1.6 // otherwise, returns false (the queue is empty). 1.7 - inline bool pop_local(E& t); 1.8 + inline bool pop_local(volatile E& t); 1.9 1.10 // Like pop_local(), but uses the "global" end of the queue (the least 1.11 // recently pushed). 1.12 - bool pop_global(E& t); 1.13 + bool pop_global(volatile E& t); 1.14 1.15 // Delete any resource associated with the queue. 1.16 ~GenericTaskQueue(); 1.17 @@ -424,7 +424,7 @@ 1.18 } 1.19 1.20 template<class E, MEMFLAGS F, unsigned int N> 1.21 -bool GenericTaskQueue<E, F, N>::pop_global(E& t) { 1.22 +bool GenericTaskQueue<E, F, N>::pop_global(volatile E& t) { 1.23 Age oldAge = _age.get(); 1.24 // Architectures with weak memory model require a barrier here 1.25 // to guarantee that bottom is not older than age, 1.26 @@ -701,7 +701,7 @@ 1.27 } 1.28 1.29 template<class E, MEMFLAGS F, unsigned int N> inline bool 1.30 -GenericTaskQueue<E, F, N>::pop_local(E& t) { 1.31 +GenericTaskQueue<E, F, N>::pop_local(volatile E& t) { 1.32 uint localBot = _bottom; 1.33 // This value cannot be N-1. That can only occur as a result of 1.34 // the assignment to bottom in this method. If it does, this method 1.35 @@ -799,7 +799,7 @@ 1.36 } 1.37 volatile ObjArrayTask& 1.38 operator =(const volatile ObjArrayTask& t) volatile { 1.39 - _obj = t._obj; 1.40 + (void)const_cast<oop&>(_obj = t._obj); 1.41 _index = t._index; 1.42 return *this; 1.43 }