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