]>
git.wh0rd.org - sysvinit.git/blob - src/set.h
2 * set.h Macros that look like sigaddset et al. but
3 * aren't. They are used to manipulate bits in
4 * an integer, to do our signal bookeeping.
6 * Copyright (C) 2005 Miquel van Smoorenburg.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #define ISMEMBER(set, val) ((set) & (1 << (val)))
25 #define DELSET(set, val) ((set) &= ~(1 << (val)))
26 #define ADDSET(set, val) ((set) |= (1 << (val)))
27 #define EMPTYSET(set) ((set) = 0)