< prev index next >

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

Print this page

        

*** 25,51 **** #ifndef SHARE_VM_GC_SHARED_GCID_HPP #define SHARE_VM_GC_SHARED_GCID_HPP #include "memory/allocation.hpp" ! class GCId VALUE_OBJ_CLASS_SPEC { ! private: ! uint _id; ! GCId(uint id) : _id(id) {} ! GCId() { } // Unused ! static uint _next_id; static const uint UNDEFINED = (uint)-1; public: ! uint id() const { ! assert(_id != UNDEFINED, "Using undefined GC ID"); ! return _id; ! } ! bool is_undefined() const; ! static const GCId create(); ! static const GCId peek(); ! static const GCId undefined(); }; #endif // SHARE_VM_GC_SHARED_GCID_HPP --- 25,50 ---- #ifndef SHARE_VM_GC_SHARED_GCID_HPP #define SHARE_VM_GC_SHARED_GCID_HPP #include "memory/allocation.hpp" ! class GCId : public AllStatic { ! friend class GCIdMark; static uint _next_id; + static uint _current_id; static const uint UNDEFINED = (uint)-1; + static const uint create(); + static void set_current(uint gc_id) { _current_id = gc_id; } public: ! static const uint current(); ! }; ! class GCIdMark { ! uint _previous_gc_id; ! DEBUG_ONLY(uint _gc_id;) ! public: ! GCIdMark(); ! ~GCIdMark(); }; #endif // SHARE_VM_GC_SHARED_GCID_HPP
< prev index next >