mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +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(
|
InterlockedDecrement(
|
||||||
LPLONG lpAddend)
|
LPLONG lpAddend)
|
||||||
{
|
{
|
||||||
LONG ret;
|
return InterlockedExchangeAdd( lpAddend, -1 ) - 1;
|
||||||
|
|
||||||
ret = *lpAddend;
|
|
||||||
ret = InterlockedExchangeAdd( lpAddend, ret - 1 );
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,7 @@
|
||||||
|
|
||||||
LONG NTAPI
|
LONG NTAPI
|
||||||
InterlockedIncrement(
|
InterlockedIncrement(
|
||||||
PLONG Addend)
|
LPLONG lpAddend)
|
||||||
{
|
{
|
||||||
LONG ret;
|
return InterlockedExchangeAdd( lpAddend, 1 ) + 1;
|
||||||
|
|
||||||
ret = *Addend;
|
|
||||||
ret = InterlockedExchangeAdd( Addend, ret + 1 );
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue