From: Lionel Sambuc Date: Fri, 30 Nov 2012 18:44:40 +0000 (+0100) Subject: Removing useless minix/types.h header X-Git-Tag: v3.2.1~169 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F130%2F3;p=minix.git Removing useless minix/types.h header Change-Id: If5f922279b87f075f301b64c7786caa18b434c2a --- diff --git a/commands/btrace/btrace.c b/commands/btrace/btrace.c index dbdf508e9..6e9451adb 100644 --- a/commands/btrace/btrace.c +++ b/commands/btrace/btrace.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/include/sys/svrctl.h b/common/include/sys/svrctl.h index 1bdad0e33..88746d4b1 100644 --- a/common/include/sys/svrctl.h +++ b/common/include/sys/svrctl.h @@ -7,9 +7,7 @@ Created: Feb 15, 1994 by Philip Homburg #ifndef _SYS__SVRCTL_H #define _SYS__SVRCTL_H -#ifndef _TYPES_H -#include -#endif +#include /* Server control commands have the same encoding as the commands for ioctls. */ #include diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 855e84f12..60a5dbc51 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -663,7 +663,7 @@ ./usr/include/minix/timers.h minix-sys ./usr/include/minix/tty.h minix-sys ./usr/include/minix/type.h minix-sys -./usr/include/minix/types.h minix-sys +./usr/include/minix/types.h minix-sys obsolete ./usr/include/minix/u64.h minix-sys ./usr/include/minix/usb_ch9.h minix-sys ./usr/include/minix/usb.h minix-sys diff --git a/external/gpl3/gcc/patches/0001-minix.patch b/external/gpl3/gcc/patches/0001-minix.patch index 30f29fce4..3c4a5efc4 100644 --- a/external/gpl3/gcc/patches/0001-minix.patch +++ b/external/gpl3/gcc/patches/0001-minix.patch @@ -56,7 +56,7 @@ diff -r -x CVS -N -U 3 dist.orig/gcc/ginclude/stddef.h dist/gcc/ginclude/stddef. #include #endif +#if defined (__minix) -+#include ++#include +#endif /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are diff --git a/include/arch/arm/include/multiboot.h b/include/arch/arm/include/multiboot.h index 751c5cdba..4b8ac1a3a 100644 --- a/include/arch/arm/include/multiboot.h +++ b/include/arch/arm/include/multiboot.h @@ -52,7 +52,7 @@ #ifndef __ASSEMBLY__ -#include +#include /* The symbol table for a.out. */ struct multiboot_aout_symbol_table { diff --git a/include/arch/i386/include/multiboot.h b/include/arch/i386/include/multiboot.h index 751c5cdba..4b8ac1a3a 100644 --- a/include/arch/i386/include/multiboot.h +++ b/include/arch/i386/include/multiboot.h @@ -52,7 +52,7 @@ #ifndef __ASSEMBLY__ -#include +#include /* The symbol table for a.out. */ struct multiboot_aout_symbol_table { diff --git a/include/lib.h b/include/lib.h index 9932a4f01..cb60ef0bd 100644 --- a/include/lib.h +++ b/include/lib.h @@ -16,7 +16,7 @@ /* The following are so basic, all the lib files get them automatically. */ #include /* must be first */ -#include +#include #include #include diff --git a/include/minix/Makefile b/include/minix/Makefile index 7df7814ab..d0627e350 100644 --- a/include/minix/Makefile +++ b/include/minix/Makefile @@ -4,7 +4,7 @@ NOOBJ= # defined INCSDIR= /usr/include/minix -INCS+= dirent.h paths.h types.h param.h +INCS+= dirent.h paths.h param.h INCS+= acpi.h audio_fw.h bitmap.h \ bdev.h blockdriver.h blockdriver_mt.h \ btrace.h \ diff --git a/include/minix/acpi.h b/include/minix/acpi.h index 129f4c45f..618339d1f 100644 --- a/include/minix/acpi.h +++ b/include/minix/acpi.h @@ -1,4 +1,4 @@ -#include +#include #include #define ACPI_REQ_GET_IRQ 1 diff --git a/include/minix/devio.h b/include/minix/devio.h index 8a2b3c8fe..435f0f58f 100644 --- a/include/minix/devio.h +++ b/include/minix/devio.h @@ -10,7 +10,7 @@ #define _DEVIO_H #include /* needed to include */ -#include /* u8_t, u16_t, u32_t needed */ +#include /* u8_t, u16_t, u32_t needed */ typedef u16_t port_t; diff --git a/include/minix/ds.h b/include/minix/ds.h index 803f58d61..b9d449ee2 100644 --- a/include/minix/ds.h +++ b/include/minix/ds.h @@ -3,7 +3,7 @@ #ifndef _MINIX_DS_H #define _MINIX_DS_H -#include +#include #include /* Flags. */ diff --git a/include/minix/ioctl.h b/include/minix/ioctl.h index 1ea5c9221..fe18d9d47 100644 --- a/include/minix/ioctl.h +++ b/include/minix/ioctl.h @@ -8,10 +8,7 @@ #define _M_IOCTL_H #include - -#ifndef _TYPES_H -#include -#endif +#include /* Ioctls have the command encoded in the low-order word, and the size * of the parameter in the high-order word. The 3 high bits of the high- diff --git a/include/minix/partition.h b/include/minix/partition.h index 07f64b436..21f743d70 100644 --- a/include/minix/partition.h +++ b/include/minix/partition.h @@ -6,9 +6,7 @@ #ifndef _MINIX__PARTITION_H #define _MINIX__PARTITION_H -#ifndef _TYPES_H -#include -#endif +#include #include diff --git a/include/minix/portio.h b/include/minix/portio.h index 4682a7b51..0075fb36c 100644 --- a/include/minix/portio.h +++ b/include/minix/portio.h @@ -7,9 +7,7 @@ Created: Jan 15, 1992 by Philip Homburg #ifndef _PORTIO_H_ #define _PORTIO_H_ -#ifndef _TYPES_H -#include -#endif +#include unsigned inb(u16_t _port); unsigned inw(u16_t _port); diff --git a/include/minix/profile.h b/include/minix/profile.h index c3f5eed46..3569bb4de 100644 --- a/include/minix/profile.h +++ b/include/minix/profile.h @@ -2,6 +2,7 @@ #define _PROFILE_H #include +#include /* * Types relating to system profiling. Types are supplied for both @@ -34,8 +35,6 @@ struct sprof_proc { char name[PROC_NAME_LEN]; }; -#include - # define PROF_GET 2 /* get call profiling tables */ # define PROF_RESET 3 /* reset call profiling tables */ diff --git a/include/minix/safecopies.h b/include/minix/safecopies.h index 5b94cc04d..aa35fc502 100644 --- a/include/minix/safecopies.h +++ b/include/minix/safecopies.h @@ -3,7 +3,7 @@ #define _MINIX_SAFECOPIES_H 1 #include -#include +#include #include #include diff --git a/include/minix/syslib.h b/include/minix/syslib.h index 38cea2e49..f1bc43186 100644 --- a/include/minix/syslib.h +++ b/include/minix/syslib.h @@ -3,19 +3,12 @@ #ifndef _SYSLIB_H #define _SYSLIB_H -#ifndef _TYPES_H -#include -#endif +#include +#include -#ifndef _IPC_H #include -#endif - #include - -#ifndef _DEVIO_H #include -#endif #include #include diff --git a/include/minix/tty.h b/include/minix/tty.h index 65712d540..fcf8d2f97 100644 --- a/include/minix/tty.h +++ b/include/minix/tty.h @@ -2,7 +2,7 @@ #ifndef _MINIX_TTY_H #define _MINIX_TTY_H -#include +#include #define TTYMAGIC 0xb105 diff --git a/include/minix/type.h b/include/minix/type.h index dbcb23e1f..7dc11f161 100644 --- a/include/minix/type.h +++ b/include/minix/type.h @@ -6,9 +6,7 @@ #include #endif -#ifndef _TYPES_H -#include -#endif +#include #include diff --git a/include/minix/types.h b/include/minix/types.h deleted file mode 100644 index b7e2c43c2..000000000 --- a/include/minix/types.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _MINIX_TYPES_H_ -#define _MINIX_TYPES_H_ - -/* Dummy file used in legacy (and shared) minix includes. */ -#include -#include - -#endif diff --git a/include/minix/u64.h b/include/minix/u64.h index 466b73e3f..aa0059c15 100644 --- a/include/minix/u64.h +++ b/include/minix/u64.h @@ -5,9 +5,7 @@ #ifndef _MINIX__U64_H #define _MINIX__U64_H -#ifndef _TYPES_H -#include -#endif +#include #include diff --git a/include/minix/usb.h b/include/minix/usb.h index cd5b6690c..07845527d 100644 --- a/include/minix/usb.h +++ b/include/minix/usb.h @@ -1,9 +1,9 @@ #ifndef _MINIX_USB_H #define _MINIX_USB_H +#include #include #include -#include #include #define USB_URBSIZE(data_size, iso_count) \ diff --git a/include/minix/usb_ch9.h b/include/minix/usb_ch9.h index b9ebab8a3..6d994a940 100644 --- a/include/minix/usb_ch9.h +++ b/include/minix/usb_ch9.h @@ -44,7 +44,7 @@ * values. */ -#include +#include typedef u8_t uByte; typedef u8_t uWord[2]; diff --git a/include/minix/vm.h b/include/minix/vm.h index 4ab02a88c..acb0a901a 100644 --- a/include/minix/vm.h +++ b/include/minix/vm.h @@ -3,7 +3,7 @@ #ifndef _MINIX_VM_H #define _MINIX_VM_H -#include +#include #include int vm_exit(endpoint_t ep); diff --git a/include/net/gen/in.h b/include/net/gen/in.h index 1f88486a5..fb4398f8d 100644 --- a/include/net/gen/in.h +++ b/include/net/gen/in.h @@ -6,7 +6,7 @@ server/ip/gen/in.h #define __SERVER__IP__GEN__IN_H__ #include -#include +#include #define IP_MIN_HDR_SIZE 20 #define IP_MAX_HDR_SIZE 60 /* 15 * 4 */ diff --git a/include/timers.h b/include/timers.h index 3773f5307..dcb5ba490 100644 --- a/include/timers.h +++ b/include/timers.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include #include diff --git a/kernel/arch/arm/direct_tty_utils.c b/kernel/arch/arm/direct_tty_utils.c index 9862cf273..7b7207859 100644 --- a/kernel/arch/arm/direct_tty_utils.c +++ b/kernel/arch/arm/direct_tty_utils.c @@ -3,9 +3,9 @@ #include #include #include -#include #include #include +#include #include #include #include "string.h" diff --git a/kernel/arch/arm/pre_init.c b/kernel/arch/arm/pre_init.c index 970e44d4a..ea7e5aa45 100644 --- a/kernel/arch/arm/pre_init.c +++ b/kernel/arch/arm/pre_init.c @@ -6,9 +6,9 @@ #include #include #include -#include #include #include +#include #include #include #include "string.h" diff --git a/kernel/arch/i386/direct_tty_utils.c b/kernel/arch/i386/direct_tty_utils.c index 72a31174c..b51c7e247 100644 --- a/kernel/arch/i386/direct_tty_utils.c +++ b/kernel/arch/i386/direct_tty_utils.c @@ -3,9 +3,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/kernel/arch/i386/pre_init.c b/kernel/arch/i386/pre_init.c index 388972354..2e8530eb3 100644 --- a/kernel/arch/i386/pre_init.c +++ b/kernel/arch/i386/pre_init.c @@ -6,9 +6,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/lib/liblwip/include/arch/cc.h b/lib/liblwip/include/arch/cc.h index f21655c1e..afad1469b 100644 --- a/lib/liblwip/include/arch/cc.h +++ b/lib/liblwip/include/arch/cc.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/lib/liblwip/sys_arch.c b/lib/liblwip/sys_arch.c index eeedb4baa..2a1e7e53d 100644 --- a/lib/liblwip/sys_arch.c +++ b/lib/liblwip/sys_arch.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/servers/mfs/mfsdir.h b/servers/mfs/mfsdir.h index d997c053c..3a3f32295 100644 --- a/servers/mfs/mfsdir.h +++ b/servers/mfs/mfsdir.h @@ -4,7 +4,7 @@ #ifdef __NBSD_LIBC #include #endif -#include +#include /* Maximum Minix MFS on-disk directory filename. * MFS uses 'struct direct' to write and parse diff --git a/sys/sys/specificdata.h b/sys/sys/specificdata.h new file mode 100644 index 000000000..3db08c67c --- /dev/null +++ b/sys/sys/specificdata.h @@ -0,0 +1,69 @@ +/* $NetBSD: specificdata.h,v 1.4 2008/04/28 20:24:11 martin Exp $ */ + +/*- + * Copyright (c) 2006 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SYS_SPECIFICDATA_H_ +#define _SYS_SPECIFICDATA_H_ + +#include + +typedef unsigned int specificdata_key_t; +typedef void (*specificdata_dtor_t)(void *); +typedef struct specificdata_domain *specificdata_domain_t; +typedef struct specificdata_container *specificdata_container_t; + +typedef struct { + specificdata_container_t specdataref_container; + kmutex_t specdataref_lock; +} specificdata_reference; + +specificdata_domain_t specificdata_domain_create(void); +void specificdata_domain_delete(specificdata_domain_t); + +int specificdata_key_create(specificdata_domain_t, + specificdata_key_t *, specificdata_dtor_t); +void specificdata_key_delete(specificdata_domain_t, specificdata_key_t); + +int specificdata_init(specificdata_domain_t, specificdata_reference *); +void specificdata_fini(specificdata_domain_t, specificdata_reference *); + +void * specificdata_getspecific(specificdata_domain_t, + specificdata_reference *, specificdata_key_t); +void * specificdata_getspecific_unlocked(specificdata_domain_t, + specificdata_reference *, + specificdata_key_t); +void specificdata_setspecific(specificdata_domain_t, + specificdata_reference *, specificdata_key_t, + void *); +int specificdata_setspecific_nowait(specificdata_domain_t, + specificdata_reference *, + specificdata_key_t, void *); + +#endif /* _SYS_SPECIFICDATA_H_ */