mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 02:13:29 +00:00
Fix non-optimized versions of InterlockedIncrement/InterlockedDecrement.
Fixes bug 916 svn path=/trunk/; revision=22309
This commit is contained in:
parent
f08c410f39
commit
b9bcb95e37
|
@ -21,10 +21,5 @@ LONG NTAPI
|
|||
InterlockedDecrement(
|
||||
LPLONG lpAddend)
|
||||
{
|
||||
LONG ret;
|
||||
|
||||
ret = *lpAddend;
|
||||
ret = InterlockedExchangeAdd( lpAddend, ret - 1 );
|
||||
|
||||
return ret;
|
||||
return InterlockedExchangeAdd( lpAddend, -1 ) - 1;
|
||||
}
|
||||
|
|
|
@ -19,12 +19,7 @@
|
|||
|
||||
LONG NTAPI
|
||||
InterlockedIncrement(
|
||||
PLONG Addend)
|
||||
LPLONG lpAddend)
|
||||
{
|
||||
LONG ret;
|
||||
|
||||
ret = *Addend;
|
||||
ret = InterlockedExchangeAdd( Addend, ret + 1 );
|
||||
|
||||
return ret;
|
||||
return InterlockedExchangeAdd( lpAddend, 1 ) + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue