hotspot/src/share/vm/utilities/globalDefinitions.hpp
changeset 30183 a6588c0a3259
parent 29193 3ede621e9262
child 30184 4454203533c3
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Sat Mar 14 16:13:48 2015 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Tue Mar 17 10:06:31 2015 +0100
@@ -1354,6 +1354,13 @@
   return (intptr_t) p;
 }
 
+// swap a & b
+template<class T> static void swap(T& a, T& b) {
+  T tmp = a;
+  a = b;
+  b = tmp;
+}
+
 // Printf-style formatters for fixed- and variable-width types as pointers and
 // integers.  These are derived from the definitions in inttypes.h.  If the platform
 // doesn't provide appropriate definitions, they should be provided in