2 * reactos inter lock increments emulation of libcaptive
3 * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "reactos/ddk/exfuncs.h" /* self */
26 * InterlockedIncrement:
27 * @Addend: #LONG variable to be +1ed.
29 * Adds 1 to a #LONG variable and returns.
30 * Currently libcaptive doesn't use multithreading
31 * and thus this function is just a simple increment now.
33 * Returns: a negative number if the @result < %0,
34 * zero if the @result == %0
35 * a positive number if the @result > %0.
36 * The returned number need not be equal to the result!!!!
38 LONG /* FASTCALL */ InterlockedIncrement(PLONG Addend)
40 /* TODO:thread; really? */
46 * InterlockedDecrement:
47 * @Addend: #LONG variable to be -1ed.
49 * Subtracts 1 from a #LONG variable and returns.
50 * Currently libcaptive doesn't use multithreading
51 * and thus this function is just a simple decrement now.
53 * Returns: a negative number if the @result < %0,
54 * zero if the @result == %0
55 * a positive number if the @result > %0.
56 * The returned number need not be equal to the result!!!!
58 LONG /* FASTCALL */ InterlockedDecrement(PLONG Subend)
60 /* TODO:thread; really? */