diff options
author | Thomas Nordin <nordin@cvs.openbsd.org> | 2002-01-30 20:45:36 +0000 |
---|---|---|
committer | Thomas Nordin <nordin@cvs.openbsd.org> | 2002-01-30 20:45:36 +0000 |
commit | f4ca009318dd00a3457741ce99764a6ba3d19a3e (patch) | |
tree | ebb8dedcc23a899dc0a07324baf6ec4ce4ad4be4 | |
parent | a9a53aa7b56a80647eeb095733a5239751dbf725 (diff) |
Move SET/CLR/ISSET macros to param.h. fgsch@ and millert@ ok
-rw-r--r-- | sys/arch/amiga/dev/com_supio.c | 7 | ||||
-rw-r--r-- | sys/arch/amiga/dev/ser.c | 7 | ||||
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc/dev/magmareg.h | 9 | ||||
-rw-r--r-- | sys/arch/sparc/dev/spif.c | 9 | ||||
-rw-r--r-- | sys/arch/sparc/dev/zs.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/z8530tty.c | 7 | ||||
-rw-r--r-- | sys/compat/common/tty_43.c | 7 | ||||
-rw-r--r-- | sys/dev/cardbus/com_cardbus.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/com.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/cy.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/cz.c | 7 | ||||
-rw-r--r-- | sys/dev/pcmcia/com_pcmcia.c | 3 | ||||
-rw-r--r-- | sys/dev/puc/com_puc.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/ucomvar.h | 7 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 6 | ||||
-rw-r--r-- | sys/kern/sys_process.c | 7 | ||||
-rw-r--r-- | sys/kern/tty.c | 7 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 7 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_ctl.c | 7 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_mem.c | 4 | ||||
-rw-r--r-- | sys/sys/param.h | 9 |
22 files changed, 29 insertions, 116 deletions
diff --git a/sys/arch/amiga/dev/com_supio.c b/sys/arch/amiga/dev/com_supio.c index 927105458da..6da2b8b793e 100644 --- a/sys/arch/amiga/dev/com_supio.c +++ b/sys/arch/amiga/dev/com_supio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_supio.c,v 1.2 1998/03/01 12:57:05 niklas Exp $ */ +/* $OpenBSD: com_supio.c,v 1.3 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: com_supio.c,v 1.3 1997/08/27 20:41:30 is Exp $ */ /*- @@ -85,11 +85,6 @@ struct cfattach com_supio_ca = { sizeof(struct comsupio_softc), com_supio_match, com_supio_attach }; -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - int com_supio_match(parent, match, aux) struct device *parent; diff --git a/sys/arch/amiga/dev/ser.c b/sys/arch/amiga/dev/ser.c index 0428bf82ebc..6463c9519c8 100644 --- a/sys/arch/amiga/dev/ser.c +++ b/sys/arch/amiga/dev/ser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ser.c,v 1.9 1998/02/22 23:33:05 niklas Exp $ */ +/* $OpenBSD: ser.c,v 1.10 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: ser.c,v 1.43 1998/01/12 10:40:11 thorpej Exp $ */ /* @@ -80,11 +80,6 @@ #define SERUNIT(dev) (minor(dev) & 0x7f) #define SERCUA(dev) (minor(dev) & 0x80) -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - void serattach __P((struct device *, struct device *, void *)); int sermatch __P((struct device *, void *, void *)); diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index 670ba4697d2..c67edf3d455 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.40 2001/08/08 19:07:17 mickey Exp $ */ +/* $OpenBSD: pccom.c,v 1.41 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -178,11 +178,6 @@ void com_kgdb_putc __P((void *, int)); #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - /* Macros for determining bus type. */ #if NPCCOM_ISA || NPCCOM_PCMCIA #define IS_ISA(parent) \ diff --git a/sys/arch/sparc/dev/magmareg.h b/sys/arch/sparc/dev/magmareg.h index bf6280b47a9..a85598cfc6f 100644 --- a/sys/arch/sparc/dev/magmareg.h +++ b/sys/arch/sparc/dev/magmareg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: magmareg.h,v 1.5 2002/01/25 02:37:43 jason Exp $ */ +/* $OpenBSD: magmareg.h,v 1.6 2002/01/30 20:45:34 nordin Exp $ */ /* magmareg.h * @@ -193,13 +193,6 @@ struct mbpp_softc { struct mbpp_port ms_port[MAGMA_MAX_BPP]; }; -/* - * useful macros - */ -#define SET(t, f) ((t) |= (f)) -#define CLR(t, f) ((t) &= ~(f)) -#define ISSET(t, f) ((t) & (f)) - /* internal function prototypes */ int cd1400_compute_baud __P((speed_t, int, int *, int *)); diff --git a/sys/arch/sparc/dev/spif.c b/sys/arch/sparc/dev/spif.c index 9e336e59e4b..7af04e8bef4 100644 --- a/sys/arch/sparc/dev/spif.c +++ b/sys/arch/sparc/dev/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.8 2001/10/05 15:50:30 jason Exp $ */ +/* $OpenBSD: spif.c,v 1.9 2002/01/30 20:45:34 nordin Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -68,13 +68,6 @@ # error "no suitable software interrupt bit" #endif -/* - * useful macros - */ -#define SET(t, f) ((t) |= (f)) -#define CLR(t, f) ((t) &= ~(f)) -#define ISSET(t, f) ((t) & (f)) - int spifmatch __P((struct device *, void *, void *)); void spifattach __P((struct device *, struct device *, void *)); diff --git a/sys/arch/sparc/dev/zs.c b/sys/arch/sparc/dev/zs.c index 20d19d6c7d0..73fa2e28b5e 100644 --- a/sys/arch/sparc/dev/zs.c +++ b/sys/arch/sparc/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.30 2002/01/10 00:06:17 nordin Exp $ */ +/* $OpenBSD: zs.c,v 1.31 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: zs.c,v 1.49 1997/08/31 21:26:37 pk Exp $ */ /* @@ -91,11 +91,6 @@ #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - #define ZSMAJOR 12 /* XXX */ #define ZS_KBD 2 /* XXX */ diff --git a/sys/arch/sparc64/dev/z8530tty.c b/sys/arch/sparc64/dev/z8530tty.c index a6db66d51b3..09976d724aa 100644 --- a/sys/arch/sparc64/dev/z8530tty.c +++ b/sys/arch/sparc64/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.2 2002/01/15 22:00:12 jason Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.3 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -191,11 +191,6 @@ struct zstty_softc { u_char zst_ppsclear; /* pps trailing edge */ }; -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - /* Definition of the driver for autoconfig. */ static int zstty_match(struct device *, void *, void *); static void zstty_attach(struct device *, struct device *, void *); diff --git a/sys/compat/common/tty_43.c b/sys/compat/common/tty_43.c index 765a63a236d..f3f72493663 100644 --- a/sys/compat/common/tty_43.c +++ b/sys/compat/common/tty_43.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_43.c,v 1.5 1996/12/16 20:04:52 tholo Exp $ */ +/* $OpenBSD: tty_43.c,v 1.6 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: tty_43.c,v 1.5 1996/05/20 14:29:17 mark Exp $ */ /*- @@ -85,11 +85,6 @@ static int compatspcodes[] = { 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200 }; -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - int ttcompatgetflags __P((struct tty *)); void ttcompatsetflags __P((struct tty *, struct termios *)); void ttcompatsetlflags __P((struct tty *, struct termios *)); diff --git a/sys/dev/cardbus/com_cardbus.c b/sys/dev/cardbus/com_cardbus.c index 2835e85f6fb..b3a18ae06ce 100644 --- a/sys/dev/cardbus/com_cardbus.c +++ b/sys/dev/cardbus/com_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_cardbus.c,v 1.5 2001/07/09 23:11:44 niklas Exp $ */ +/* $OpenBSD: com_cardbus.c,v 1.6 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: com_cardbus.c,v 1.4 2000/04/17 09:21:59 joda Exp $ */ /* @@ -73,7 +73,6 @@ #include <dev/ic/ns16550reg.h> #define com_lcr com_cfcr -#define SET(t, f) (t) |= (f) struct com_cardbus_softc { struct com_softc cc_com; diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index ce9170b8218..87b148938d5 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.79 2002/01/25 21:23:38 mickey Exp $ */ +/* $OpenBSD: com.c,v 1.80 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -138,11 +138,6 @@ void com_kgdb_putc __P((void *, int)); #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - int comspeed(freq, speed) long freq; diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index 9117d0870ad..dbfab37de69 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.15 2001/08/20 04:41:39 smart Exp $ */ +/* $OpenBSD: cy.c,v 1.16 2002/01/30 20:45:34 nordin Exp $ */ /* * cy.c @@ -57,12 +57,6 @@ #include <dev/ic/cyreg.h> -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - - void cy_attach __P((struct device *, struct device *, void *)); int cy_probe_common __P((int, bus_space_tag_t, bus_space_handle_t, int)); int cy_intr __P((void *)); diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 402b758a821..3643c48cfda 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.4 2001/09/04 04:01:42 nate Exp $ */ +/* $OpenBSD: cz.c,v 1.5 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -198,11 +198,6 @@ struct cfdriver cz_cd = { 0, "cz", DV_TTY }; -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - /* * Macros to read and write the PLX. */ diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c index ebbb1e309a7..501307d0625 100644 --- a/sys/dev/pcmcia/com_pcmcia.c +++ b/sys/dev/pcmcia/com_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_pcmcia.c,v 1.29 2001/08/17 21:52:16 deraadt Exp $ */ +/* $OpenBSD: com_pcmcia.c,v 1.30 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */ /* @@ -140,7 +140,6 @@ #include <dev/isa/isareg.h> #define com_lcr com_cfcr -#define SET(t, f) (t) |= (f) /* Devices that we need to match by CIS strings */ struct com_pcmcia_product { diff --git a/sys/dev/puc/com_puc.c b/sys/dev/puc/com_puc.c index a17b595759c..f90beda12e2 100644 --- a/sys/dev/puc/com_puc.c +++ b/sys/dev/puc/com_puc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_puc.c,v 1.3 2001/08/08 15:10:03 mickey Exp $ */ +/* $OpenBSD: com_puc.c,v 1.4 2002/01/30 20:45:34 nordin Exp $ */ /* * Copyright (c) 1997 - 1999, Jason Downs. All rights reserved. @@ -66,7 +66,6 @@ #include <dev/ic/ns16550reg.h> #define com_lcr com_cfcr -#define SET(t, f) (t) |= (f) int com_puc_match __P((struct device *, void *, void *)); void com_puc_attach __P((struct device *, struct device *, void *)); diff --git a/sys/dev/usb/ucomvar.h b/sys/dev/usb/ucomvar.h index 4003c388ef2..d3619824464 100644 --- a/sys/dev/usb/ucomvar.h +++ b/sys/dev/usb/ucomvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ucomvar.h,v 1.7 2001/10/31 04:24:44 nate Exp $ */ +/* $OpenBSD: ucomvar.h,v 1.8 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: ucomvar.h,v 1.9 2001/01/23 21:56:17 augustss Exp $ */ /* @@ -39,11 +39,6 @@ */ -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - #if defined(__NetBSD__) #include "locators.h" #endif diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 1efd8e38a08..7b26856bc51 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.36 2001/11/26 16:02:30 mickey Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.37 2002/01/30 20:45:34 nordin Exp $ */ /* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */ /* @@ -206,10 +206,6 @@ int wsdisplayparam __P((struct tty *, struct termios *)); /* Internal macros, functions, and variables. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - #define WSDISPLAYUNIT(dev) (minor(dev) >> 8) #define WSDISPLAYSCREEN(dev) (minor(dev) & 0xff) #define ISWSDISPLAYCTL(dev) (WSDISPLAYSCREEN(dev) == 255) diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 2e27b3d46ea..9799445a778 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_process.c,v 1.16 2002/01/20 11:27:52 art Exp $ */ +/* $OpenBSD: sys_process.c,v 1.17 2002/01/30 20:45:35 nordin Exp $ */ /* $NetBSD: sys_process.c,v 1.55 1996/05/15 06:17:47 tls Exp $ */ /*- @@ -71,11 +71,6 @@ #include <miscfs/procfs/procfs.h> -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - /* * Process debugging system call. */ diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d6a553af795..232ca05f1d9 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.49 2001/12/27 22:34:36 nordin Exp $ */ +/* $OpenBSD: tty.c,v 1.50 2002/01/30 20:45:35 nordin Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -156,11 +156,6 @@ u_char const char_type[] = { #undef TB #undef VT -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~((unsigned)(f)) -#define ISSET(t, f) ((t) & (f)) - #define islower(c) ((c) >= 'a' && (c) <= 'z') #define isupper(c) ((c) >= 'A' && (c) <= 'Z') diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 50ffa1f3880..75e8949dc1c 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.56 2002/01/23 00:39:48 art Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.57 2002/01/30 20:45:35 nordin Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /*- @@ -65,11 +65,6 @@ #include <miscfs/specfs/specdev.h> -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - /* * Definitions for the buffer hash lists. */ diff --git a/sys/miscfs/procfs/procfs_ctl.c b/sys/miscfs/procfs/procfs_ctl.c index 5b2d9ab50d0..4b09aaaae23 100644 --- a/sys/miscfs/procfs/procfs_ctl.c +++ b/sys/miscfs/procfs/procfs_ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_ctl.c,v 1.7 1997/08/29 04:24:37 millert Exp $ */ +/* $OpenBSD: procfs_ctl.c,v 1.8 2002/01/30 20:45:35 nordin Exp $ */ /* $NetBSD: procfs_ctl.c,v 1.14 1996/02/09 22:40:48 christos Exp $ */ /* @@ -102,11 +102,6 @@ static vfs_namemap_t signames[] = { static int procfs_control __P((struct proc *, struct proc *, int)); -/* Macros to clear/set/test flags. */ -#define SET(t, f) (t) |= (f) -#define CLR(t, f) (t) &= ~(f) -#define ISSET(t, f) ((t) & (f)) - static int procfs_control(curp, p, op) struct proc *curp; /* tracer */ diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c index afa929c1f7a..a06866f537a 100644 --- a/sys/miscfs/procfs/procfs_mem.c +++ b/sys/miscfs/procfs/procfs_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_mem.c,v 1.16 2002/01/20 11:27:52 art Exp $ */ +/* $OpenBSD: procfs_mem.c,v 1.17 2002/01/30 20:45:35 nordin Exp $ */ /* $NetBSD: procfs_mem.c,v 1.8 1996/02/09 22:40:50 christos Exp $ */ /* @@ -56,8 +56,6 @@ #include <uvm/uvm_extern.h> -#define ISSET(t, f) ((t) & (f)) - /* * Copy data in and out of the target process. * We do this by mapping the process's page into diff --git a/sys/sys/param.h b/sys/sys/param.h index 0dbb101ed1b..4584609afe8 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.45 2001/12/19 08:58:07 art Exp $ */ +/* $OpenBSD: param.h,v 1.46 2002/01/30 20:45:35 nordin Exp $ */ /* $NetBSD: param.h,v 1.23 1996/03/17 01:02:29 thorpej Exp $ */ /*- @@ -158,6 +158,13 @@ #define MAXPATHLEN PATH_MAX #define MAXSYMLINKS 32 +/* Macros to set/clear/test flags. */ +#ifdef _KERNEL +#define SET(t, f) ((t) |= (f)) +#define CLR(t, f) ((t) &= ~(f)) +#define ISSET(t, f) ((t) & (f)) +#endif + /* Bit map related macros. */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) |