网站首页  词典首页

请输入您要查询的函数:

 

术语 interlockedcompareexchangerelease64
释义 InterlockedCompareExchangeRelease64
语法:
C++
LONGLONG __cdecl InterlockedCompareExchangeRelease64(
__inout LONGLONG volatile *Destination,
__in LONGLONG Exchange,
__in LONGLONG Comparand
);
InterlockedCompareExchangeRelease64功能
执行一个原子的比较,并在指定的值交换操作。比较函数与另一个64位值的基础上比较的结果,两个指定的64位值和交流。该交易所是执行与释放内存存取语义。
运作32位值,使用InterlockedCompareExchangeRelease功能。
参数
目的地[ in , out ]
一个目的地的价值指针。
外汇 [in]
交换价值。
Comparand [in]
该值比较目的地。
返回值
该函数返回目的地参数的初始值。
备注
这个函数比较与Comparand价值目标的价值。如果目标的价值等于Comparand价值,交换价值都将保存在目的地指定的地址。否则,任何操作执行。
此函数的变量必须对齐64位边界,否则,此函数将表现在多处理器的x86系统和不可预测的任何非x86系统。见_aligned_malloc。
在互锁功能提供了一个同步进入一个变量是由多个线程共享的简单机制。此函数是原子与其他方面的互锁函数的调用。
此功能是使用一个编译器的内在可能的情况下。有关详细信息,请参阅Winbase.h头文件和_InterlockedCompareExchange64_rel。
对于处理器不支持释放内存访问语义,这个函数被定义为一对InterlockedCompareExchange64函数调用。有关更多信息,请参阅Winbase.h。
要求:
client最低支持Vista
最低支持serverWindows服务器2003
HeaderWinbase.h(头文件:winuser.h)
参见
互锁变量访问
InterlockedCompare64ExchangeRelease128
InterlockedCompareExchange64
InterlockedCompareExchangeAcquire64
InterlockedCompareExchangeRelease
同步功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==InterlockedCompareExchangeRelease64 Function
Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 64-bit values and exchanges with another 64-bit value based on the outcome of the comparison. The exchange is performed with release memory access semantics.
To operate on 32-bit values, use the InterlockedCompareExchangeRelease function.
Syntax
C++
LONGLONG __cdecl InterlockedCompareExchangeRelease64(
__inout LONGLONG volatile *Destination,
__in LONGLONG Exchange,
__in LONGLONG Comparand
);
Parameters
Destination [in, out]
A pointer to the destination value.
Exchange [in]
The exchange value.
Comparand [in]
The value to compare to Destination.
Return Value
The function returns the initial value of the Destination parameter.
Remarks
This function compares the Destination value with the Comparand value. If the Destination value is equal to the Comparand value, the Exchange value is stored in the address specified by Destination. Otherwise, no operation is performed.
The variables for this function must be aligned on a 64-bit boundary; otherwise, this function will behave unpredictably on multiprocessor x86 systems and any non-x86 systems. See _aligned_malloc.
The interlocked functions provide a simple mechanism for synchronizing access to a variable that is shared by multiple threads. This function is atomic with respect to calls to other interlocked functions.
This function is implemented using a compiler intrinsic where possible. For more information, see the Winbase.h header file and _InterlockedCompareExchange64_rel .
For processors that do not support release memory access semantics, this function is defined as a call to the InterlockedCompareExchange64 function. For more information, see Winbase.h.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2003
HeaderWinbase.h (include Windows.h)
See Also
Interlocked Variable Access
InterlockedCompare64ExchangeRelease128
InterlockedCompareExchange64
InterlockedCompareExchangeAcquire64
InterlockedCompareExchangeRelease
Synchronization Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683576(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:23:01