2009-01-30 01:45:13 +01:00
|
|
|
/** @file
|
|
|
|
InterlockedDecrement function
|
|
|
|
|
2018-09-07 11:26:14 +02:00
|
|
|
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
2019-04-04 01:06:00 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2009-01-30 01:45:13 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
/**
|
|
|
|
Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.
|
|
|
|
**/
|
|
|
|
|
|
|
|
long _InterlockedDecrement(
|
|
|
|
long * lpAddend
|
|
|
|
);
|
|
|
|
|
|
|
|
#pragma intrinsic(_InterlockedDecrement)
|
|
|
|
|
|
|
|
/**
|
|
|
|
Performs an atomic decrement of an 32-bit unsigned integer.
|
|
|
|
|
|
|
|
Performs an atomic decrement of the 32-bit unsigned integer specified by
|
|
|
|
Value and returns the decrement value. The decrement operation must be
|
|
|
|
performed using MP safe mechanisms. The state of the return value is not
|
|
|
|
guaranteed to be MP safe.
|
|
|
|
|
|
|
|
@param Value A pointer to the 32-bit value to decrement.
|
|
|
|
|
|
|
|
@return The decrement value.
|
|
|
|
|
|
|
|
**/
|
|
|
|
UINT32
|
|
|
|
EFIAPI
|
|
|
|
InternalSyncDecrement (
|
2016-11-16 23:37:15 +01:00
|
|
|
IN volatile UINT32 *Value
|
2009-01-30 01:45:13 +01:00
|
|
|
)
|
|
|
|
{
|
2018-09-07 11:26:14 +02:00
|
|
|
return _InterlockedDecrement ((long *)(Value));
|
2009-01-30 01:45:13 +01:00
|
|
|
}
|
|
|
|
|