return !!::HndFirstAssignHandle(handle, ObjectToOBJECTREF(object));
}
-Object* GCHandleManager::CompareAndSwapObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject)
+Object* GCHandleManager::InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject)
{
return (Object*)::HndInterlockedCompareExchangeHandle(handle, ObjectToOBJECTREF(object), ObjectToOBJECTREF(comparandObject));
}
virtual bool StoreObjectInHandleIfNull(OBJECTHANDLE handle, Object* object);
- virtual Object* CompareAndSwapObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject);
+ virtual Object* InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject);
};
#endif // GCHANDLETABLE_H_
virtual bool StoreObjectInHandleIfNull(OBJECTHANDLE handle, Object* object) = 0;
- virtual Object* CompareAndSwapObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject) = 0;
+ virtual Object* InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject) = 0;
};
// IGCHeap is the interface that the VM will use when interacting with the GC.
{
ValidateHandleAssignment(handle, object);
- return GCHandleUtilities::GetGCHandleManager()->CompareAndSwapObjectInHandle(handle, OBJECTREFToObject(object), OBJECTREFToObject(comparandObject));
+ return GCHandleUtilities::GetGCHandleManager()->InterlockedCompareExchangeObjectInHandle(handle, OBJECTREFToObject(object), OBJECTREFToObject(comparandObject));
}
inline void ResetOBJECTHANDLE(OBJECTHANDLE handle)