mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs
The SpinLock functions in the SynchronicationLib use volatile parameters to keep compiler from optimizing these functions too much. The volatile keyword is missing from the Interlocked*() functions in this same library instance. Update the library instance to consistently use volatile on all functions in the SynchronizationLib class. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Andrew Fish <afish@apple.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
7375f3f11a
commit
4cee954ea8
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -30,7 +30,7 @@
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange16 (
|
||||
; IN UINT16 *Value,
|
||||
; IN volatile UINT16 *Value,
|
||||
; IN UINT16 CompareValue,
|
||||
; IN UINT16 ExchangeValue
|
||||
; );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedCompareExchange16 function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -36,7 +36,7 @@
|
||||
UINT16
|
||||
EFIAPI
|
||||
InternalSyncCompareExchange16 (
|
||||
IN UINT16 *Value,
|
||||
IN volatile UINT16 *Value,
|
||||
IN UINT16 CompareValue,
|
||||
IN UINT16 ExchangeValue
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -28,7 +28,7 @@
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange16 (
|
||||
; IN UINT16 *Value,
|
||||
; IN volatile UINT16 *Value,
|
||||
; IN UINT16 CompareValue,
|
||||
; IN UINT16 ExchangeValue
|
||||
; );
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -29,7 +29,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange32 (
|
||||
; IN UINT32 *Value,
|
||||
; IN volatile UINT32 *Value,
|
||||
; IN UINT32 CompareValue,
|
||||
; IN UINT32 ExchangeValue
|
||||
; );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedCompareExchange32 function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -35,7 +35,7 @@
|
||||
UINT32
|
||||
EFIAPI
|
||||
InternalSyncCompareExchange32 (
|
||||
IN UINT32 *Value,
|
||||
IN volatile UINT32 *Value,
|
||||
IN UINT32 CompareValue,
|
||||
IN UINT32 ExchangeValue
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange32 (
|
||||
; IN UINT32 *Value,
|
||||
; IN volatile UINT32 *Value,
|
||||
; IN UINT32 CompareValue,
|
||||
; IN UINT32 ExchangeValue
|
||||
; );
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -29,7 +29,7 @@
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange64 (
|
||||
; IN UINT64 *Value,
|
||||
; IN volatile UINT64 *Value,
|
||||
; IN UINT64 CompareValue,
|
||||
; IN UINT64 ExchangeValue
|
||||
; );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedCompareExchange64 function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -34,7 +34,7 @@
|
||||
UINT64
|
||||
EFIAPI
|
||||
InternalSyncCompareExchange64 (
|
||||
IN UINT64 *Value,
|
||||
IN volatile UINT64 *Value,
|
||||
IN UINT64 CompareValue,
|
||||
IN UINT64 ExchangeValue
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InternalSyncCompareExchange64 (
|
||||
; IN UINT64 *Value,
|
||||
; IN volatile UINT64 *Value,
|
||||
; IN UINT64 CompareValue,
|
||||
; IN UINT64 ExchangeValue
|
||||
; );
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -29,7 +29,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncDecrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncDecrement PROC
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedDecrement function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -31,7 +31,7 @@
|
||||
UINT32
|
||||
EFIAPI
|
||||
InternalSyncDecrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
_asm {
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncDecrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
global ASM_PFX(InternalSyncDecrement)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -29,7 +29,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncIncrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncIncrement PROC
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterLockedIncrement function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -31,7 +31,7 @@
|
||||
UINT32
|
||||
EFIAPI
|
||||
InternalSyncIncrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
_asm {
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InternalSyncIncrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
global ASM_PFX(InternalSyncIncrement)
|
||||
|
@ -244,7 +244,7 @@ ReleaseSpinLock (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedIncrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
ASSERT (Value != NULL);
|
||||
@ -269,7 +269,7 @@ InterlockedIncrement (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedDecrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
ASSERT (Value != NULL);
|
||||
@ -298,7 +298,7 @@ InterlockedDecrement (
|
||||
UINT16
|
||||
EFIAPI
|
||||
InterlockedCompareExchange16 (
|
||||
IN OUT UINT16 *Value,
|
||||
IN OUT volatile UINT16 *Value,
|
||||
IN UINT16 CompareValue,
|
||||
IN UINT16 ExchangeValue
|
||||
)
|
||||
@ -329,7 +329,7 @@ InterlockedCompareExchange16 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedCompareExchange32 (
|
||||
IN OUT UINT32 *Value,
|
||||
IN OUT volatile UINT32 *Value,
|
||||
IN UINT32 CompareValue,
|
||||
IN UINT32 ExchangeValue
|
||||
)
|
||||
@ -359,7 +359,7 @@ InterlockedCompareExchange32 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
InterlockedCompareExchange64 (
|
||||
IN OUT UINT64 *Value,
|
||||
IN OUT volatile UINT64 *Value,
|
||||
IN UINT64 CompareValue,
|
||||
IN UINT64 ExchangeValue
|
||||
)
|
||||
@ -389,7 +389,7 @@ InterlockedCompareExchange64 (
|
||||
VOID *
|
||||
EFIAPI
|
||||
InterlockedCompareExchangePointer (
|
||||
IN OUT VOID **Value,
|
||||
IN OUT VOID * volatile *Value,
|
||||
IN VOID *CompareValue,
|
||||
IN VOID *ExchangeValue
|
||||
)
|
||||
@ -401,13 +401,13 @@ InterlockedCompareExchangePointer (
|
||||
switch (SizeOfValue) {
|
||||
case sizeof (UINT32):
|
||||
return (VOID*)(UINTN)InterlockedCompareExchange32 (
|
||||
(UINT32*)Value,
|
||||
(volatile UINT32 *)Value,
|
||||
(UINT32)(UINTN)CompareValue,
|
||||
(UINT32)(UINTN)ExchangeValue
|
||||
);
|
||||
case sizeof (UINT64):
|
||||
return (VOID*)(UINTN)InterlockedCompareExchange64 (
|
||||
(UINT64*)Value,
|
||||
(volatile UINT64 *)Value,
|
||||
(UINT64)(UINTN)CompareValue,
|
||||
(UINT64)(UINTN)ExchangeValue
|
||||
);
|
||||
|
@ -260,7 +260,7 @@ ReleaseSpinLock (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedIncrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
ASSERT (Value != NULL);
|
||||
@ -285,7 +285,7 @@ InterlockedIncrement (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedDecrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
ASSERT (Value != NULL);
|
||||
@ -314,7 +314,7 @@ InterlockedDecrement (
|
||||
UINT16
|
||||
EFIAPI
|
||||
InterlockedCompareExchange16 (
|
||||
IN OUT UINT16 *Value,
|
||||
IN OUT volatile UINT16 *Value,
|
||||
IN UINT16 CompareValue,
|
||||
IN UINT16 ExchangeValue
|
||||
)
|
||||
@ -345,7 +345,7 @@ InterlockedCompareExchange16 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedCompareExchange32 (
|
||||
IN OUT UINT32 *Value,
|
||||
IN OUT volatile UINT32 *Value,
|
||||
IN UINT32 CompareValue,
|
||||
IN UINT32 ExchangeValue
|
||||
)
|
||||
@ -375,7 +375,7 @@ InterlockedCompareExchange32 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
InterlockedCompareExchange64 (
|
||||
IN OUT UINT64 *Value,
|
||||
IN OUT volatile UINT64 *Value,
|
||||
IN UINT64 CompareValue,
|
||||
IN UINT64 ExchangeValue
|
||||
)
|
||||
@ -405,7 +405,7 @@ InterlockedCompareExchange64 (
|
||||
VOID *
|
||||
EFIAPI
|
||||
InterlockedCompareExchangePointer (
|
||||
IN OUT VOID **Value,
|
||||
IN OUT VOID * volatile *Value,
|
||||
IN VOID *CompareValue,
|
||||
IN VOID *ExchangeValue
|
||||
)
|
||||
@ -417,13 +417,13 @@ InterlockedCompareExchangePointer (
|
||||
switch (SizeOfValue) {
|
||||
case sizeof (UINT32):
|
||||
return (VOID*)(UINTN)InterlockedCompareExchange32 (
|
||||
(UINT32*)Value,
|
||||
(volatile UINT32 *)Value,
|
||||
(UINT32)(UINTN)CompareValue,
|
||||
(UINT32)(UINTN)ExchangeValue
|
||||
);
|
||||
case sizeof (UINT64):
|
||||
return (VOID*)(UINTN)InterlockedCompareExchange64 (
|
||||
(UINT64*)Value,
|
||||
(volatile UINT64 *)Value,
|
||||
(UINT64)(UINTN)CompareValue,
|
||||
(UINT64)(UINTN)ExchangeValue
|
||||
);
|
||||
|
@ -262,7 +262,7 @@ ReleaseSpinLock (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedIncrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
ASSERT (Value != NULL);
|
||||
@ -287,7 +287,7 @@ InterlockedIncrement (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedDecrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
ASSERT (Value != NULL);
|
||||
@ -316,7 +316,7 @@ InterlockedDecrement (
|
||||
UINT16
|
||||
EFIAPI
|
||||
InterlockedCompareExchange16 (
|
||||
IN OUT UINT16 *Value,
|
||||
IN OUT volatile UINT16 *Value,
|
||||
IN UINT16 CompareValue,
|
||||
IN UINT16 ExchangeValue
|
||||
)
|
||||
@ -347,7 +347,7 @@ InterlockedCompareExchange16 (
|
||||
UINT32
|
||||
EFIAPI
|
||||
InterlockedCompareExchange32 (
|
||||
IN OUT UINT32 *Value,
|
||||
IN OUT volatile UINT32 *Value,
|
||||
IN UINT32 CompareValue,
|
||||
IN UINT32 ExchangeValue
|
||||
)
|
||||
@ -377,7 +377,7 @@ InterlockedCompareExchange32 (
|
||||
UINT64
|
||||
EFIAPI
|
||||
InterlockedCompareExchange64 (
|
||||
IN OUT UINT64 *Value,
|
||||
IN OUT volatile UINT64 *Value,
|
||||
IN UINT64 CompareValue,
|
||||
IN UINT64 ExchangeValue
|
||||
)
|
||||
@ -407,7 +407,7 @@ InterlockedCompareExchange64 (
|
||||
VOID *
|
||||
EFIAPI
|
||||
InterlockedCompareExchangePointer (
|
||||
IN OUT VOID **Value,
|
||||
IN OUT VOID * volatile *Value,
|
||||
IN VOID *CompareValue,
|
||||
IN VOID *ExchangeValue
|
||||
)
|
||||
@ -419,13 +419,13 @@ InterlockedCompareExchangePointer (
|
||||
switch (SizeOfValue) {
|
||||
case sizeof (UINT32):
|
||||
return (VOID*)(UINTN)InterlockedCompareExchange32 (
|
||||
(UINT32*)Value,
|
||||
(volatile UINT32*)Value,
|
||||
(UINT32)(UINTN)CompareValue,
|
||||
(UINT32)(UINTN)ExchangeValue
|
||||
);
|
||||
case sizeof (UINT64):
|
||||
return (VOID*)(UINTN)InterlockedCompareExchange64 (
|
||||
(UINT64*)Value,
|
||||
(volatile UINT64*)Value,
|
||||
(UINT64)(UINTN)CompareValue,
|
||||
(UINT64)(UINTN)ExchangeValue
|
||||
);
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -28,7 +28,7 @@
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; InterlockedCompareExchange16 (
|
||||
; IN UINT16 *Value,
|
||||
; IN volatile UINT16 *Value,
|
||||
; IN UINT16 CompareValue,
|
||||
; IN UINT16 ExchangeValue
|
||||
; );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedCompareExchange16 function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -44,7 +44,7 @@ __int16 _InterlockedCompareExchange16(
|
||||
UINT16
|
||||
EFIAPI
|
||||
InternalSyncCompareExchange16 (
|
||||
IN UINT16 *Value,
|
||||
IN volatile UINT16 *Value,
|
||||
IN UINT16 CompareValue,
|
||||
IN UINT16 ExchangeValue
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -29,7 +29,7 @@
|
||||
; UINT16
|
||||
; EFIAPI
|
||||
; InterlockedCompareExchange16 (
|
||||
; IN UINT16 *Value,
|
||||
; IN volatile UINT16 *Value,
|
||||
; IN UINT16 CompareValue,
|
||||
; IN UINT16 ExchangeValue
|
||||
; );
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InterlockedCompareExchange32 (
|
||||
; IN UINT32 *Value,
|
||||
; IN volatile UINT32 *Value,
|
||||
; IN UINT32 CompareValue,
|
||||
; IN UINT32 ExchangeValue
|
||||
; );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedCompareExchange32 function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -44,7 +44,7 @@ long _InterlockedCompareExchange(
|
||||
UINT32
|
||||
EFIAPI
|
||||
InternalSyncCompareExchange32 (
|
||||
IN UINT32 *Value,
|
||||
IN volatile UINT32 *Value,
|
||||
IN UINT32 CompareValue,
|
||||
IN UINT32 ExchangeValue
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -28,7 +28,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InterlockedCompareExchange32 (
|
||||
; IN UINT32 *Value,
|
||||
; IN volatile UINT32 *Value,
|
||||
; IN UINT32 CompareValue,
|
||||
; IN UINT32 ExchangeValue
|
||||
; );
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InterlockedCompareExchange64 (
|
||||
; IN UINT64 *Value,
|
||||
; IN volatile UINT64 *Value,
|
||||
; IN UINT64 CompareValue,
|
||||
; IN UINT64 ExchangeValue
|
||||
; );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedCompareExchange64 function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -43,7 +43,7 @@ __int64 _InterlockedCompareExchange64(
|
||||
UINT64
|
||||
EFIAPI
|
||||
InternalSyncCompareExchange64 (
|
||||
IN UINT64 *Value,
|
||||
IN volatile UINT64 *Value,
|
||||
IN UINT64 CompareValue,
|
||||
IN UINT64 ExchangeValue
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -28,7 +28,7 @@
|
||||
; UINT64
|
||||
; EFIAPI
|
||||
; InterlockedCompareExchange64 (
|
||||
; IN UINT64 *Value,
|
||||
; IN volatile UINT64 *Value,
|
||||
; IN UINT64 CompareValue,
|
||||
; IN UINT64 ExchangeValue
|
||||
; );
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InterlockedDecrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncDecrement PROC
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterlockedDecrement function
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -38,9 +38,9 @@ long _InterlockedDecrement(
|
||||
UINT32
|
||||
EFIAPI
|
||||
InternalSyncDecrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
return _InterlockedDecrement (Value);
|
||||
return _InterlockedDecrement ((long *)(UINTN)(Value));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -28,7 +28,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InterlockedDecrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
global ASM_PFX(InternalSyncDecrement)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -27,7 +27,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InterlockedIncrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
InternalSyncIncrement PROC
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
InterLockedIncrement function
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -38,9 +38,9 @@ long _InterlockedIncrement(
|
||||
UINT32
|
||||
EFIAPI
|
||||
InternalSyncIncrement (
|
||||
IN UINT32 *Value
|
||||
IN volatile UINT32 *Value
|
||||
)
|
||||
{
|
||||
return _InterlockedIncrement (Value);
|
||||
return _InterlockedIncrement ((long *)(UINTN)(Value));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
; which accompanies this distribution. The full text of the license may be found at
|
||||
@ -28,7 +28,7 @@
|
||||
; UINT32
|
||||
; EFIAPI
|
||||
; InterlockedIncrement (
|
||||
; IN UINT32 *Value
|
||||
; IN volatile UINT32 *Value
|
||||
; );
|
||||
;------------------------------------------------------------------------------
|
||||
global ASM_PFX(InternalSyncIncrement)
|
||||
|
Loading…
x
Reference in New Issue
Block a user