Files
@ d6b9b2ac5869
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public-bincomp/vmkernel64/release/core/vmkapi_spinlock_deprecated.h
d6b9b2ac5869
5.1 KiB
text/x-chdr
ESXi-5.5-U2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | /* **********************************************************
* Copyright 2012 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
******************************************************************************
* Spin Locks */ /**
*
* \addtogroup Core
* @{
* \addtogroup SpinLocks
* @{
* \defgroup Deprecated Deprecated APIs
* @{
*
******************************************************************************
*/
#ifndef _VMKAPI_SPINLOCK_DEPRECATED_H_
#define _VMKAPI_SPINLOCK_DEPRECATED_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
/** Invalid lock irql */
#define VMK_SPINLOCK_IRQL_INVALID ((vmk_LockIRQL)-1)
/**
* \brief Spinlock Types
* @{
*/
/** Spinlock usable from a world and interrupt handler context */
#define VMK_SPINLOCK_IRQ (2)
/** @} */
/**
* \brief IRQ level of a VMK_SPINLOCK_IRQ lock.
*/
typedef vmk_uint32 vmk_LockIRQL;
/*
******************************************************************************
* vmk_SpinlockLockIRQ -- */ /**
*
* \brief Acquire a spinlock of type VMK_SPINLOCK_IRQ
*
* \deprecated
*
* \param[in,out] lock IRQ Spinlock to be acquired
* \param[out] irql Previous IRQ level of spinlock
*
* \return VMK_OK on success, error code otherwise
*
* \note Lock checks are only executed when enabled for a given build. They
* are always enabled for debug builds.
* \note A caller has to release the spinlock with a subsequent call to
* vmk_SpinlockUnlockIRQ, providing the value returned in irql.
* \note Callers are required to minimize the time and code that is executed
* while any type of spinlock is held.
* \note This function will not block.
*
* \nativedriversdisallowed
*
******************************************************************************
*/
VMK_ReturnStatus
vmk_SpinlockLockIRQ(vmk_Lock lock,
vmk_LockIRQL *irql);
/*
******************************************************************************
* vmk_SpinlockUnlockIRQ -- */ /**
*
* \brief Release a IRQ spinlock previously acquired via vmk_SpinlockLockIRQ
*
* \deprecated
*
* \param[in,out] lock IRQ Spinlock to be released
* \param[in] irql IRQ level of spinlock prior to locking
*
* \note Callers are required to release spinlocks in the reverse order in which
* they were acquired
* \note This function will not block
*
* \nativedriversdisallowed
*
******************************************************************************
*/
void
vmk_SpinlockUnlockIRQ(vmk_Lock lock,
vmk_LockIRQL irql);
/*
******************************************************************************
* vmk_SpinlockUnlockIRQOutOfOrder -- */ /**
*
* \brief Out of order release of a IRQ spinlock previously acquired via
* vmk_SpinlockLockIRQ
*
* \deprecated
*
* \param[in,out] lock IRQ Spinlock to be released
* \param[in] irql IRQ level of spinlock prior to locking
*
* \note Callers are normally required to release spinlocks in the reverse
* order in which they were acquired. This function allows for out
* of order releases but this should only be done when it is known to
* be safe. This function should only be used for out of order releases;
* in all other cases vmk_SpinlockUnlockIRQ should be used.
* \note This function will not block
*
* \nativedriversdisallowed
*
******************************************************************************
*/
void
vmk_SpinlockUnlockIRQOutOfOrder(vmk_Lock lock,
vmk_LockIRQL irql);
/*
******************************************************************************
* vmk_SpinlockAssertHeldOnPCPUInt --
*
* This is used by vmk_SpinlockAssertHeldOnPCPU(). VMKAPI clients should not
* call this function directly.
*
* \deprecated
*
* \note This function will not block
*
* \nativedriversdisallowed
*
******************************************************************************
*/
/** \cond nodoc */
void
vmk_SpinlockAssertHeldOnPCPUInt(vmk_Lock lock);
/** \endcond */
/*
******************************************************************************
* vmk_SpinlockAssertHeldOnPCPU -- */ /**
*
* \brief Asserts that a lock is held on the current PCPU
*
* \deprecated
*
* \param[in] lock Lock to check
*
* \note Checks are only executed on debug builds.
* \note This function should only be called with a lock of lock type
* VMK_SPINLOCK_IRQ
* \note This function will not block
*
* \nativedriversdisallowed
*
******************************************************************************
*/
static VMK_ALWAYS_INLINE void
vmk_SpinlockAssertHeldOnPCPU(
vmk_Lock lock)
{
#ifdef VMX86_DEBUG
vmk_SpinlockAssertHeldOnPCPUInt(lock);
#endif
}
#endif
/** @} */
/** @} */
/** @} */
|