corrected Windows lt_atomic_int_dec_and_test()

check pre-decremented value for zero

Change-Id: Ib2289cb6064941db2072b2dfbd6ad5f03bcff7aa
This commit is contained in:
Eike Rathke 2012-11-08 23:11:44 +01:00
parent b0050ee6da
commit 45d196c0cc

View file

@ -74,7 +74,7 @@
+{
+ lt_return_val_if_fail (v != NULL, FALSE);
+
+ return 1 == InterlockedExchangeAdd((LONG*)v, -1) - 1;
+ return 0 == (InterlockedExchangeAdd((LONG*)v, -1) - 1);
+}
+
+