]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseSynchronizationLib / X64 / InterlockedIncrement.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; InterlockedIncrement.Asm
9 ;
10 ; Abstract:
11 ;
12 ; InterlockedIncrement function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 DEFAULT REL
19 SECTION .text
20
21 ;------------------------------------------------------------------------------
22 ; UINT32
23 ; EFIAPI
24 ; InternalSyncIncrement (
25 ; IN volatile UINT32 *Value
26 ; );
27 ;------------------------------------------------------------------------------
28 global ASM_PFX(InternalSyncIncrement)
29 ASM_PFX(InternalSyncIncrement):
30 mov eax, 1
31 lock xadd dword [rcx], eax
32 inc eax
33 ret
34