]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/InterlockedCompareExchange64.c
a6711d3faaa56c76808619fd2779f1f9c6ed7d42
2 InterlockedCompareExchange64 function
4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "BaseLibInternals.h"
19 InternalSyncCompareExchange64 (
20 IN
volatile UINT64
*Value
,
21 IN UINT64 CompareValue
,
22 IN UINT64 ExchangeValue
27 mov eax
, dword ptr
[CompareValue
+ 0]
28 mov edx
, dword ptr
[CompareValue
+ 4]
29 mov ebx
, dword ptr
[ExchangeValue
+ 0]
30 mov ecx
, dword ptr
[ExchangeValue
+ 4]
31 lock cmpxchg8b qword ptr
[esi
]