mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 13:39:26 +02:00
+ added some extra checks
git-svn-id: trunk@14316 -
This commit is contained in:
parent
36ebb6a980
commit
5939a03017
@ -25,12 +25,20 @@ begin
|
|||||||
c:=1;
|
c:=1;
|
||||||
if interlockeddecrement(c)<>0 then
|
if interlockeddecrement(c)<>0 then
|
||||||
halt(1);
|
halt(1);
|
||||||
|
if (c<>0) then
|
||||||
|
halt(11);
|
||||||
if interlockedincrement(c)<>1 then
|
if interlockedincrement(c)<>1 then
|
||||||
halt(2);
|
halt(2);
|
||||||
|
if (c<>1) then
|
||||||
|
halt(12);
|
||||||
if interlockedexchange(c,1234)<>1 then
|
if interlockedexchange(c,1234)<>1 then
|
||||||
halt(3);
|
halt(3);
|
||||||
|
if (c<>1234) then
|
||||||
|
halt(13);
|
||||||
if InterLockedExchangeAdd(c,5)<>1234 then
|
if InterLockedExchangeAdd(c,5)<>1234 then
|
||||||
halt(4);
|
halt(4);
|
||||||
|
if (c<>1239) then
|
||||||
|
halt(14);
|
||||||
if InterlockedCompareExchange(c,$80000000,1239)<>1239 then
|
if InterlockedCompareExchange(c,$80000000,1239)<>1239 then
|
||||||
halt(5);
|
halt(5);
|
||||||
if (c<>$80000000) then
|
if (c<>$80000000) then
|
||||||
|
Loading…
Reference in New Issue
Block a user