< prev index next >

src/hotspot/share/gc/z/zLock.hpp


*** 1,7 **** /* ! * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. ***************
*** 32,44 **** pthread_mutex_t _lock; public: ZLock(); ! void lock(); ! bool try_lock(); ! void unlock(); }; class ZLocker : public StackObj { private: ZLock* const _lock; --- 32,44 ---- pthread_mutex_t _lock; public: ZLock(); ! virtual void lock(); ! virtual bool try_lock(); ! virtual void unlock(); }; class ZLocker : public StackObj { private: ZLock* const _lock; ***************
*** 46,51 **** --- 46,65 ---- public: ZLocker(ZLock* lock); ~ZLocker(); }; + class ZReentrantLock: public ZLock { + Thread* volatile _owner; + + public: + ZReentrantLock(); + + virtual void lock(); + virtual bool try_lock(); + virtual void unlock(); + + bool is_owned() const; + bool reentrant_lock(); + }; + #endif // SHARE_GC_Z_ZLOCK_HPP
< prev index next >