brutisso@6904: /* brutisso@6904: * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. brutisso@6904: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. brutisso@6904: * brutisso@6904: * This code is free software; you can redistribute it and/or modify it brutisso@6904: * under the terms of the GNU General Public License version 2 only, as brutisso@6904: * published by the Free Software Foundation. brutisso@6904: * brutisso@6904: * This code is distributed in the hope that it will be useful, but WITHOUT brutisso@6904: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or brutisso@6904: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License brutisso@6904: * version 2 for more details (a copy is included in the LICENSE file that brutisso@6904: * accompanied this code). brutisso@6904: * brutisso@6904: * You should have received a copy of the GNU General Public License version brutisso@6904: * 2 along with this work; if not, write to the Free Software Foundation, brutisso@6904: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. brutisso@6904: * brutisso@6904: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA brutisso@6904: * or visit www.oracle.com if you need additional information or have any brutisso@6904: * questions. brutisso@6904: * brutisso@6904: */ brutisso@6904: brutisso@6904: #include "precompiled.hpp" brutisso@6904: #include "gc_implementation/shared/gcId.hpp" brutisso@6904: #include "runtime/safepoint.hpp" brutisso@6904: brutisso@6904: uint GCId::_next_id = 0; brutisso@6904: brutisso@6904: const GCId GCId::create() { brutisso@6904: return GCId(_next_id++); brutisso@6904: } brutisso@6904: const GCId GCId::peek() { brutisso@6904: return GCId(_next_id); brutisso@6904: } brutisso@6904: const GCId GCId::undefined() { brutisso@6904: return GCId(UNDEFINED); brutisso@6904: } brutisso@6904: bool GCId::is_undefined() const { brutisso@6904: return _id == UNDEFINED; brutisso@6904: }