ole32: Fix an invalid usage of InterlockedCompareExchange.
This commit is contained in:
parent
68528519fc
commit
c23db594aa
|
@ -805,11 +805,12 @@ static HRESULT proxy_manager_construct(
|
||||||
|
|
||||||
static inline void proxy_manager_set_context(struct proxy_manager *This, MSHCTX dest_context, void *dest_context_data)
|
static inline void proxy_manager_set_context(struct proxy_manager *This, MSHCTX dest_context, void *dest_context_data)
|
||||||
{
|
{
|
||||||
MSHCTX old_dest_context = This->dest_context;
|
MSHCTX old_dest_context;
|
||||||
MSHCTX new_dest_context;
|
MSHCTX new_dest_context;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
old_dest_context = This->dest_context;
|
||||||
new_dest_context = old_dest_context;
|
new_dest_context = old_dest_context;
|
||||||
/* "stronger" values overwrite "weaker" values. stronger values are
|
/* "stronger" values overwrite "weaker" values. stronger values are
|
||||||
* ones that disable more optimisations */
|
* ones that disable more optimisations */
|
||||||
|
@ -853,7 +854,7 @@ static inline void proxy_manager_set_context(struct proxy_manager *This, MSHCTX
|
||||||
|
|
||||||
if (old_dest_context == new_dest_context) break;
|
if (old_dest_context == new_dest_context) break;
|
||||||
|
|
||||||
old_dest_context = InterlockedCompareExchange((PLONG)&This->dest_context, new_dest_context, old_dest_context);
|
new_dest_context = InterlockedCompareExchange((PLONG)&This->dest_context, new_dest_context, old_dest_context);
|
||||||
} while (new_dest_context != old_dest_context);
|
} while (new_dest_context != old_dest_context);
|
||||||
|
|
||||||
if (dest_context_data)
|
if (dest_context_data)
|
||||||
|
|
Loading…
Reference in New Issue