src/share/vm/jfr/recorder/storage/jfrStorageUtils.hpp

changeset 9928
d2c2cd90513e
parent 9858
b985cbb00e68
     1.1 --- a/src/share/vm/jfr/recorder/storage/jfrStorageUtils.hpp	Mon Jun 15 20:21:56 2020 +0100
     1.2 +++ b/src/share/vm/jfr/recorder/storage/jfrStorageUtils.hpp	Wed Jun 17 11:43:05 2020 +0300
     1.3 @@ -92,7 +92,6 @@
     1.4    size_t processed() const { return ConcurrentWriteOp<Operation>::processed(); }
     1.5  };
     1.6  
     1.7 -
     1.8  template <typename Operation>
     1.9  class MutexedWriteOp {
    1.10   private:
    1.11 @@ -104,6 +103,15 @@
    1.12    size_t processed() const { return _operation.processed(); }
    1.13  };
    1.14  
    1.15 +template <typename Operation>
    1.16 +class ExclusiveOp : private MutexedWriteOp<Operation> {
    1.17 + public:
    1.18 +  typedef typename Operation::Type Type;
    1.19 +  ExclusiveOp(Operation& operation) : MutexedWriteOp<Operation>(operation) {}
    1.20 +  bool process(Type* t);
    1.21 +  size_t processed() const { return MutexedWriteOp<Operation>::processed(); }
    1.22 +};
    1.23 +
    1.24  enum jfr_operation_mode {
    1.25    mutexed = 1,
    1.26    concurrent

mercurial