mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +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
2 changed files with 3 additions and 13 deletions
|
@ -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