summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm')
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm16
1 files changed, 5 insertions, 11 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm
index 0325fdf93e90..d36d9b0073b7 100644
--- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm
+++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm
@@ -1,13 +1,7 @@
;------------------------------------------------------------------------------
;
-; 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
-; http://opensource.org/licenses/bsd-license.php.
-;
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
@@ -33,7 +27,7 @@
;------------------------------------------------------------------------------
global ASM_PFX(InternalSyncDecrement)
ASM_PFX(InternalSyncDecrement):
- lock dec dword [rcx]
- mov eax, [rcx]
+ mov eax, 0FFFFFFFFh
+ lock xadd dword [rcx], eax
+ dec eax
ret
-