网站首页  词典首页

请输入您要查询的函数:

 

术语 interlockedexchangepointer
释义 InterlockedExchangePointer
语法:
C++
PVOID __cdecl InterlockedExchangePointer(
__inout PVOID volatile *Target,
__in PVOID Value
);
InterlockedExchangePointer功能
原子交流的地址对。
参数
目标[ in , out ]
一个交换地址指针。该函数设置报告指出的目标参数(*目标)的地址是值的参数值,并返回先前的目标参数值。
值 [in]
地址被交换的报告指出的目标参数(*目标)。
返回值
该函数返回的初步报告指出的目标参数。
备注
这个函数的副本作为第二个参数传递的第一个地址和返回的第一个原地址。
在64位系统,参数都是64位的目标参数必须对齐64位界限,否则,该函数将unpredictably行为。在32位系统,参数是32位和目标参数必须在32位边界对齐。
在互锁功能提供了一个同步进入一个变量是由多个线程共享的简单机制。此函数是原子与其他方面的互锁函数的调用。
此功能是使用一个编译器的内在可能的情况下。有关详细信息,请参阅Winbase.h头文件和_InterlockedExchangePointer。
这个函数生成一个完整的内存屏障(或栅栏),以确保内存操作才能完成。
英特尔森林小组:对于性能要求较高的应用程序,使用InterlockedExchangePointerAcquire代替。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
参见
互锁变量访问
InterlockedCompareExchangePointer
InterlockedExchange
InterlockedExchangeAdd
InterlockedExchangePointerAcquire
同步功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==InterlockedExchangePointer Function
Atomically exchanges a pair of addresses.
Syntax
C++
PVOID __cdecl InterlockedExchangePointer(
__inout PVOID volatile *Target,
__in PVOID Value
);
Parameters
Target [in, out]
A pointer to the address to exchange. The function sets the address pointed to by the Target parameter (*Target) to the address that is the value of the Value parameter, and returns the prior value of the Target parameter.
Value [in]
The address to be exchanged with the address pointed to by the Target parameter (*Target).
Return Value
The function returns the initial address pointed to by the Target parameter.
Remarks
This function copies the address passed as the second parameter to the first and returns the original address of the first.
On a 64-bit system, the parameters are 64 bits and the Target parameter must be aligned on 64-bit boundaries; otherwise, the function will behave unpredictably. On a 32-bit system, the parameters are 32 bits and the Target parameter must be aligned on 32-bit boundaries.
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 _InterlockedExchangePointer .
This function generates a full memory barrier (or fence) to ensure that memory operations are completed in order.
Intel IPF: For performance-critical applications, use InterlockedExchangePointerAcquire instead.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
See Also
Interlocked Variable Access
InterlockedCompareExchangePointer
InterlockedExchange
InterlockedExchangeAdd
InterlockedExchangePointerAcquire
Synchronization Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683609(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:17:10