< prev index next >
src/hotspot/share/utilities/waitBarrier_generic.hpp
Print this page
rev 53038 : 8214271: Fast primitive to wake many threads
Reviewed-by:
rev 53039 : [mq]: 8214271-3
*** 26,43 ****
#define SHARE_UTILITIES_WAITBARRIER_GENERIC_HPP
#include "memory/allocation.hpp"
#include "runtime/semaphore.hpp"
! // Except for the barrier tag it self, it uses two counter to keep the semaphore
! // count correct and not leave any late thread hanging.
class GenericWaitBarrier : public CHeapObj<mtInternal> {
volatile int _barrier_tag;
// The number of threads waiting on or about to wait on the semaphore.
volatile int _waiters;
// The number of threads in the wait path, before or after the tag check.
! // Which means it can become a waiter.
volatile int _barrier_threads;
Semaphore _sem_barrier;
// Prevent copying and assignment of GenericWaitBarrier instances.
GenericWaitBarrier(const GenericWaitBarrier&);
--- 26,43 ----
#define SHARE_UTILITIES_WAITBARRIER_GENERIC_HPP
#include "memory/allocation.hpp"
#include "runtime/semaphore.hpp"
! // Except for the barrier tag itself, 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;
// The number of threads waiting on or about to wait on the semaphore.
volatile int _waiters;
// 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&);
< prev index next >