InterlockedAdd() is not supported on all the platforms we wish to
support. However, InterlockedExchangeAdd() is. The two
functions are semantically similar with the exception that
InterlockedExchangeAdd() returns the initial value of the object
being modified while InterlockedAdd() returns the resulting
value. Since the return value of the rx_MutexAdd() macro is
unused, this is irrelevant.
Reviewed-on: http://gerrit.openafs.org/98
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
extern int rx_DumpCalls(FILE *outputFile, char *cookie);
#define rx_MutexIncrement(object, mutex) InterlockedIncrement(&object)
-#define rx_MutexAdd(object, addend, mutex) InterlockedAdd(&object, addend)
+#define rx_MutexAdd(object, addend, mutex) InterlockedExchangeAdd(&object, addend)
#define rx_MutexDecrement(object, mutex) InterlockedDecrement(&object)
#define rx_MutexAdd1Increment2(object1, addend, object2, mutex) \
do { \