< prev index next >

src/hotspot/share/gc/shared/ptrQueue.hpp

Print this page
rev 57095 : [mq]: use
rev 57096 : [mq]: trailing_semi

@@ -27,10 +27,11 @@
 
 #include "memory/padded.hpp"
 #include "utilities/align.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/lockFreeStack.hpp"
+#include "utilities/macros.hpp"
 #include "utilities/sizes.hpp"
 
 class Mutex;
 class Monitor;
 

@@ -42,13 +43,11 @@
 class BufferNode;
 class PtrQueueSet;
 class PtrQueue {
   friend class VMStructs;
 
-  // Noncopyable - not defined.
-  PtrQueue(const PtrQueue&);
-  PtrQueue& operator=(const PtrQueue&);
+  NONCOPYABLE(PtrQueue);
 
   // The ptr queue set to which this queue belongs.
   PtrQueueSet* const _qset;
 
   // Whether updates should be logged.

@@ -203,10 +202,12 @@
   void* _buffer[1];             // Pseudo flexible array member.
 
   BufferNode() : _index(0), _next(NULL) { }
   ~BufferNode() { }
 
+  NONCOPYABLE(BufferNode);
+
   static size_t buffer_offset() {
     return offset_of(BufferNode, _buffer);
   }
 
   static BufferNode* volatile* next_ptr(BufferNode& bn) { return &bn._next; }

@@ -271,10 +272,12 @@
 #undef DECLARE_PADDED_MEMBER
 
   void delete_list(BufferNode* list);
   bool try_transfer_pending();
 
+  NONCOPYABLE(Allocator);
+
 public:
   Allocator(const char* name, size_t buffer_size);
   ~Allocator();
 
   const char* name() const { return _name; }

@@ -293,13 +296,11 @@
 // In particular, the individual queues allocate buffers from this shared
 // set, and return completed buffers to the set.
 class PtrQueueSet {
   BufferNode::Allocator* _allocator;
 
-  // Noncopyable - not defined.
-  PtrQueueSet(const PtrQueueSet&);
-  PtrQueueSet& operator=(const PtrQueueSet&);
+  NONCOPYABLE(PtrQueueSet);
 
 protected:
   bool _all_active;
 
   // Create an empty ptr queue set.
< prev index next >