spinlock-generic.cpp revision f0ed7ab5e7f8d2f73b5aa08e46eb3a04cbb31cb2
48N/A * IPRT - Spinlock, generic implementation. 48N/A * Copyright (C) 2006-2012 Oracle Corporation 48N/A * This file is part of VirtualBox Open Source Edition (OSE), as 48N/A * you can redistribute it and/or modify it under the terms of the GNU 48N/A * General Public License (GPL) as published by the Free Software 48N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 48N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 48N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 48N/A * The contents of this file may alternatively be used under the terms 48N/A * of the Common Development and Distribution License Version 1.0 48N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the 48N/A * VirtualBox OSE distribution, in which case the provisions of the 48N/A * CDDL are applicable instead of those of the GPL. 48N/A * You may elect to license modified versions of this file under the 48N/A * terms and conditions of either the GPL or the CDDL or both. 48N/A/******************************************************************************* 48N/A* Defined Constants And Macros * 48N/A*******************************************************************************/ 48N/A/** @def RT_CFG_SPINLOCK_GENERIC_DO_SLEEP 48N/A * Force cpu yields after spinning the number of times indicated by the define. 70N/A * If 0 we will spin forever. */ 70N/A/******************************************************************************* 48N/A*******************************************************************************/ 70N/A/******************************************************************************* 70N/A* Structures and Typedefs * 70N/A*******************************************************************************/ 70N/A * Generic spinlock structure. 70N/A /** Spinlock magic value (RTSPINLOCK_MAGIC). */ 70N/A /** The spinlock creation flags. */ 48N/A /** The spinlock. */ 48N/A /** The saved CPU interrupt. */