3a855daf2894549813dddc64ab30a16d9906fb5a
2 * PROJECT: ReactOS system libraries
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/intrlck/exchange.c
5 * PURPOSE: Inter lock exchanges
6 * PROGRAMMERS: Copyright 1995 Martin von Loewis
7 * Copyright 1997 Onno Hovers
12 /************************************************************************
15 * Atomically exchanges a pair of values.
18 * Prior value of value pointed to by Target
30 ret
= *(volatile LONG
*)target
;
31 } while( InterlockedCompareExchange( target
, value
, ret
) != ret
);