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