2
$Id: sysutilp.inc,v 1.2 2004/03/05 12:17:50 marco Exp $
3
This file is part of the Free Pascal run time library.
5
Copyright (c) 2003 by Peter Vreman,
6
member of the Free Pascal development team
8
See the file COPYING.FPC, included in this distribution,
9
for details about the copyright.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
**********************************************************************}
17
{ ---------------------------------------------------------------------
18
This include contains cpu-specific routines
19
---------------------------------------------------------------------}
21
function InterLockedDecrement (var Target: longint) : longint; assembler;
26
{ input: address of target in r3 }
27
{ output: target-1 in r3 }
28
{ side-effect: target := target-1 }
34
bne InterLockedDecLoop
40
function InterLockedIncrement (var Target: longint) : longint; assembler;
45
{ input: address of target in r3 }
46
{ output: target+1 in r3 }
47
{ side-effect: target := target+1 }
53
bne InterLockedIncLoop
58
function InterLockedExchange (var Target: longint;Source : longint) : longint; assembler;
63
{ input: address of target in r3, source in r4 }
64
{ output: target in r3 }
65
{ side-effect: target := source }
70
bne InterLockedXchgLoop
76
function InterLockedExchangeAdd (var Target: longint;Source : longint) : longint; assembler;
81
{ input: address of target in r3, source in r4 }
82
{ output: target in r3 }
83
{ side-effect: target := target+source }
85
InterLockedXchgAddLoop:
89
bne InterLockedXchgAddLoop
95
$Log: sysutilp.inc,v $
96
Revision 1.2 2004/03/05 12:17:50 marco
97
* interlocked* changed to longints, including winapi. (which was a bug)
99
Revision 1.1 2003/09/01 20:46:32 peter