"Fossies" - the Fresh Open Source Software Archive

Member "sysvinit-2.99/src/set.h" (21 Feb 2021, 1121 Bytes) of package /linux/misc/sysvinit-2.99.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "set.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.98_vs_2.99.

    1 /*
    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 bookkeeping.
    5  *
    6  * Copyright (C) 2005 Miquel van Smoorenburg.
    7  *
    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.
   12  * 
   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.
   17  * 
   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
   21  *
   22  */
   23 
   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)
   28