< prev index next >
src/hotspot/share/utilities/waitBarrier_generic.hpp
Print this page
rev 57095 : [mq]: use
rev 57096 : [mq]: trailing_semi
@@ -25,10 +25,11 @@
#ifndef SHARE_UTILITIES_WAITBARRIER_GENERIC_HPP
#define SHARE_UTILITIES_WAITBARRIER_GENERIC_HPP
#include "memory/allocation.hpp"
#include "runtime/semaphore.hpp"
+#include "utilities/macros.hpp"
// In addition to the barrier tag, it uses two counters to keep the semaphore
// count correct and not leave any late thread waiting.
class GenericWaitBarrier : public CHeapObj<mtInternal> {
volatile int _barrier_tag;
@@ -37,13 +38,11 @@
// The number of threads in the wait path, before or after the tag check.
// These threads can become waiters.
volatile int _barrier_threads;
Semaphore _sem_barrier;
- // Prevent copying and assignment of GenericWaitBarrier instances.
- GenericWaitBarrier(const GenericWaitBarrier&);
- GenericWaitBarrier& operator=(const GenericWaitBarrier&);
+ NONCOPYABLE(GenericWaitBarrier);
int wake_if_needed();
public:
GenericWaitBarrier() : _barrier_tag(0), _waiters(0), _barrier_threads(0), _sem_barrier(0) {}
< prev index next >