diff options
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm')
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm index c960cb451196c..fd046958b9ffa 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; @@ -33,7 +27,8 @@ ;------------------------------------------------------------------------------ global ASM_PFX(InternalSyncIncrement) ASM_PFX(InternalSyncIncrement): - lock inc dword [rcx] - mov eax, [rcx] + mov eax, 1 + lock xadd dword [rcx], eax + inc eax ret |