diff options
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.nasm')
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.nasm | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.nasm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.nasm index 78e444ad02c32..d441915310a10 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.nasm +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/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: ; @@ -32,8 +26,9 @@ ;------------------------------------------------------------------------------ global ASM_PFX(InternalSyncIncrement) ASM_PFX(InternalSyncIncrement): - mov eax, [esp + 4] - lock inc dword [eax] - mov eax, [eax] + mov ecx, [esp + 4] + mov eax, 1 + lock xadd dword [ecx], eax + inc eax ret |