< prev index next >

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

Print this page

        

*** 26,65 **** #define SHARE_VM_GC_SHARED_GCID_HPP #include "memory/allocation.hpp" class GCId : public AllStatic { friend class GCIdMark; ! friend class GCIdMarkAndRestore; static uint _next_id; static const uint UNDEFINED = (uint)-1; ! static const uint create(); ! public: // Returns the currently active GC id. Asserts that there is an active GC id. ! static const uint current(); // Same as current() but can return undefined() if no GC id is currently active ! static const uint current_or_undefined(); // Returns the next expected GCId. ! static const uint peek(); ! static const uint undefined() { return UNDEFINED; } static size_t print_prefix(char* buf, size_t len); }; class GCIdMark : public StackObj { ! uint _gc_id; ! public: GCIdMark(); GCIdMark(uint gc_id); ~GCIdMark(); }; - class GCIdMarkAndRestore : public StackObj { - uint _gc_id; - uint _previous_gc_id; - public: - GCIdMarkAndRestore(); - GCIdMarkAndRestore(uint gc_id); - ~GCIdMarkAndRestore(); - }; - #endif // SHARE_VM_GC_SHARED_GCID_HPP --- 26,59 ---- #define SHARE_VM_GC_SHARED_GCID_HPP #include "memory/allocation.hpp" class GCId : public AllStatic { + private: friend class GCIdMark; ! static uint _next_id; static const uint UNDEFINED = (uint)-1; ! static uint create(); ! public: // Returns the currently active GC id. Asserts that there is an active GC id. ! static uint current(); // Same as current() but can return undefined() if no GC id is currently active ! static uint current_or_undefined(); // Returns the next expected GCId. ! static uint peek(); ! static uint undefined() { return UNDEFINED; } static size_t print_prefix(char* buf, size_t len); }; class GCIdMark : public StackObj { ! private: ! const uint _previous_gc_id; ! ! public: GCIdMark(); GCIdMark(uint gc_id); ~GCIdMark(); }; #endif // SHARE_VM_GC_SHARED_GCID_HPP
< prev index next >