mtlist.h revision 4520ec42b031779169b52cb9536f22937fd9bf97
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * IPRT - Generic thread-safe list Class.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright (C) 2011 Oracle Corporation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * available from http://www.virtualbox.org. This file is free software;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * you can redistribute it and/or modify it under the terms of the GNU
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * General Public License (GPL) as published by the Free Software
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * The contents of this file may alternatively be used under the terms
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * of the Common Development and Distribution License Version 1.0
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox OSE distribution, in which case the provisions of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * CDDL are applicable instead of those of the GPL.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * You may elect to license modified versions of this file under the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * terms and conditions of either the GPL or the CDDL or both.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/** @addtogroup grp_rt_cpp_list
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * A guard class for thread-safe read/write access.
inline void enterRead() const { int rc = RTSemRWRequestRead(m_hRWSem, RT_INDEFINITE_WAIT); AssertRC(rc); }
inline void enterWrite() { int rc = RTSemRWRequestWrite(m_hRWSem, RT_INDEFINITE_WAIT); AssertRC(rc); }
template <>
template <>