_iprt_atomic.h revision 49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * IPRT Atomic Operation, for including into a system config header.
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * Copyright (C) 2009 Sun Microsystems, Inc.
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * available from http://www.virtualbox.org. This file is free software;
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * you can redistribute it and/or modify it under the terms of the GNU
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * General Public License (GPL) as published by the Free Software
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * The contents of this file may alternatively be used under the terms
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * of the Common Development and Distribution License Version 1.0
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * VirtualBox OSE distribution, in which case the provisions of the
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * CDDL are applicable instead of those of the GPL.
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * You may elect to license modified versions of this file under the
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * terms and conditions of either the GPL or the CDDL or both.
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync * additional information or have any questions.
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync/* Note! Do not copy this around, put it in a header of its own if reused anywhere! */
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync#define _MD_INIT_ATOMIC() do {} while (0)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsyncDECLINLINE(PRInt32) _PR_IPRT_AtomicIncrement(PRInt32 *pVal)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync#define _MD_ATOMIC_INCREMENT(pVal) _PR_IPRT_AtomicIncrement(pVal)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsyncDECLINLINE(PRInt32) _PR_IPRT_AtomicDecrement(PRInt32 *pVal)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync#define _MD_ATOMIC_DECREMENT(pVal) _PR_IPRT_AtomicDecrement(pVal)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsyncDECLINLINE(PRInt32) _PR_IPRT_AtomicSet(PRInt32 *pVal, PRInt32 NewVal)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsync#define _MD_ATOMIC_SET(pVal, NewVal) _PR_IPRT_AtomicSet(pVal, NewVal)
49aaec872ad8c04d8b2cd5abb6b1f7f582c4e9b4vboxsyncDECLINLINE(PRInt32) _PR_IPRT_AtomicAdd(PRInt32 *pVal, PRInt32 ToAdd)