b48bfda6ec76f8113298776d3cb032548305df72
2 * PROJECT: ReactOS system libraries
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/intrlck/i386/exchangeadd.c
5 * PURPOSE: Inter lock exchange adds
6 * PROGRAMMERS: Copyright 1995 Martin von Loewis
7 * Copyright 1997 Onno Hovers
10 /************************************************************************
11 * InterlockedExchangeAdd
13 * Atomically adds Increment to Addend and returns the previous value of
17 * Prior value of value pointed to by Addend
21 * LONG NTAPI InterlockedExchangeAdd(PLONG Addend, LONG Increment)
27 InterlockedExchangeAdd(
28 IN OUT LONG
volatile *Addend
,
33 /* lock for SMP systems */
37 :"r" (Addend
), "0" (Increment
)