svn commit: r228405 - head/sys/dev/e1000
Author: jfv Date: Sun Dec 11 09:37:25 2011 New Revision: 228405 URL: http://svn.freebsd.org/changeset/base/228405 Log: Correct LINT build issues in the ioctl code. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Sun Dec 11 00:04:18 2011(r228404) +++ head/sys/dev/e1000/if_em.c Sun Dec 11 09:37:25 2011(r228405) @@ -1045,8 +1045,8 @@ em_ioctl(struct ifnet *ifp, u_long comma struct ifreq*ifr = (struct ifreq *)data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; -#endif boolavoid_reset = FALSE; +#endif int error = 0; if (adapter->in_detach) @@ -1058,6 +1058,11 @@ em_ioctl(struct ifnet *ifp, u_long comma if (ifa->ifa_addr->sa_family == AF_INET) avoid_reset = TRUE; #endif +#ifdef INET6 + if (ifa->ifa_addr->sa_family == AF_INET6) + avoid_reset = TRUE; +#endif +#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -1066,12 +1071,11 @@ em_ioctl(struct ifnet *ifp, u_long comma ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) em_init(adapter); -#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); -#endif } else error = ether_ioctl(ifp, command, data); +#endif break; case SIOCSIFMTU: { Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Sun Dec 11 00:04:18 2011(r228404) +++ head/sys/dev/e1000/if_igb.c Sun Dec 11 09:37:25 2011(r228405) @@ -992,9 +992,9 @@ igb_ioctl(struct ifnet *ifp, u_long comm struct ifreq*ifr = (struct ifreq *)data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; + boolavoid_reset = FALSE; #endif int error = 0; - boolavoid_reset = FALSE; if (adapter->in_detach) return (error); @@ -1005,10 +1005,11 @@ igb_ioctl(struct ifnet *ifp, u_long comm if (ifa->ifa_addr->sa_family == AF_INET) avoid_reset = TRUE; #endif -#ifdef INET +#ifdef INET6 if (ifa->ifa_addr->sa_family == AF_INET6) avoid_reset = TRUE; #endif +#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -1017,12 +1018,11 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) igb_init(adapter); -#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); -#endif } else error = ether_ioctl(ifp, command, data); +#endif break; case SIOCSIFMTU: { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228406 - head/bin/stty
Author: ed Date: Sun Dec 11 09:56:48 2011 New Revision: 228406 URL: http://svn.freebsd.org/changeset/base/228406 Log: Move 3.5 KB from the data segment to the text segment. The `struct modes' are only used by the getter-functions in the same file, so we can safely mark them static and const. Modified: head/bin/stty/modes.c Modified: head/bin/stty/modes.c == --- head/bin/stty/modes.c Sun Dec 11 09:37:25 2011(r228405) +++ head/bin/stty/modes.c Sun Dec 11 09:56:48 2011(r228406) @@ -52,7 +52,7 @@ struct modes { * The code in optlist() depends on minus options following regular * options, i.e. "foo" must immediately precede "-foo". */ -struct modes cmodes[] = { +static const struct modes cmodes[] = { { "cs5",CS5, CSIZE }, { "cs6",CS6, CSIZE }, { "cs7",CS7, CSIZE }, @@ -94,7 +94,7 @@ struct modes cmodes[] = { { NULL, 0, 0 }, }; -struct modes imodes[] = { +static const struct modes imodes[] = { { "ignbrk", IGNBRK, 0 }, { "-ignbrk",0, IGNBRK }, { "brkint", BRKINT, 0 }, @@ -130,7 +130,7 @@ struct modes imodes[] = { { NULL, 0, 0 }, }; -struct modes lmodes[] = { +static const struct modes lmodes[] = { { "echo", ECHO, 0 }, { "-echo", 0, ECHO }, { "echoe", ECHOE, 0 }, @@ -182,7 +182,7 @@ struct modes lmodes[] = { { NULL, 0, 0 }, }; -struct modes omodes[] = { +static const struct modes omodes[] = { { "opost", OPOST, 0 }, { "-opost", 0, OPOST }, { "litout", 0, OPOST }, @@ -209,7 +209,7 @@ struct modes omodes[] = { int msearch(char ***argvp, struct info *ip) { - struct modes *mp; + const struct modes *mp; char *name; name = **argvp; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228407 - head/sbin/camcontrol
Author: ed Date: Sun Dec 11 11:38:50 2011 New Revision: 228407 URL: http://svn.freebsd.org/changeset/base/228407 Log: Add missing static keywords to global variables in camcontrol. While there, make the vendor list const and add appropriate keywords to functions that use this list. Modified: head/sbin/camcontrol/fwdownload.c head/sbin/camcontrol/modeedit.c Modified: head/sbin/camcontrol/fwdownload.c == --- head/sbin/camcontrol/fwdownload.c Sun Dec 11 09:56:48 2011 (r228406) +++ head/sbin/camcontrol/fwdownload.c Sun Dec 11 11:38:50 2011 (r228407) @@ -88,7 +88,7 @@ struct fw_vendor { int inc_cdb_offset; }; -struct fw_vendor vendors_list[] = { +static const struct fw_vendor vendors_list[] = { {VENDOR_HITACHI,"HITACHI", 0x8000, 0x05, 0x05, 1, 0}, {VENDOR_HP, "HP", 0x8000, 0x07, 0x07, 0, 1}, {VENDOR_IBM,"IBM", 0x8000, 0x05, 0x05, 1, 0}, @@ -98,22 +98,22 @@ struct fw_vendor vendors_list[] = { {VENDOR_UNKNOWN,NULL, 0x, 0x00, 0x00, 0, 0} }; -static struct fw_vendor *fw_get_vendor(struct cam_device *cam_dev); -static char*fw_read_img(char *fw_img_path, struct fw_vendor *vp, - int *num_bytes); +static const struct fw_vendor *fw_get_vendor(struct cam_device *cam_dev); +static char*fw_read_img(const char *fw_img_path, + const struct fw_vendor *vp, int *num_bytes); static int fw_download_img(struct cam_device *cam_dev, - struct fw_vendor *vp, char *buf, int img_size, + const struct fw_vendor *vp, char *buf, int img_size, int sim_mode, int verbose, int retry_count, int timeout); /* * Find entry in vendors list that belongs to * the vendor of given cam device. */ -static struct fw_vendor * +static const struct fw_vendor * fw_get_vendor(struct cam_device *cam_dev) { char vendor[SID_VENDOR_SIZE + 1]; - struct fw_vendor *vp; + const struct fw_vendor *vp; if (cam_dev == NULL) return (NULL); @@ -133,7 +133,7 @@ fw_get_vendor(struct cam_device *cam_dev * in num_bytes. */ static char * -fw_read_img(char *fw_img_path, struct fw_vendor *vp, int *num_bytes) +fw_read_img(const char *fw_img_path, const struct fw_vendor *vp, int *num_bytes) { int fd; struct stat stbuf; @@ -205,7 +205,7 @@ bailout1: * device but do not sent any actual packets */ static int -fw_download_img(struct cam_device *cam_dev, struct fw_vendor *vp, +fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp, char *buf, int img_size, int sim_mode, int verbose, int retry_count, int timeout) { @@ -319,7 +319,7 @@ int fwdownload(struct cam_device *device, int argc, char **argv, char *combinedopt, int verbose, int retry_count, int timeout) { - struct fw_vendor *vp; + const struct fw_vendor *vp; char *fw_img_path = NULL; char *buf; int img_size; Modified: head/sbin/camcontrol/modeedit.c == --- head/sbin/camcontrol/modeedit.c Sun Dec 11 09:56:48 2011 (r228406) +++ head/sbin/camcontrol/modeedit.c Sun Dec 11 11:38:50 2011 (r228407) @@ -83,15 +83,15 @@ struct editentry { char*svalue; } value; }; -STAILQ_HEAD(, editentry) editlist; /* List of page entries. */ -int editlist_changed = 0; /* Whether any entries were changed. */ +static STAILQ_HEAD(, editentry) editlist; /* List of page entries. */ +static int editlist_changed = 0; /* Whether any entries were changed. */ struct pagename { SLIST_ENTRY(pagename) link; int pagenum; char *name; }; -SLIST_HEAD(, pagename) namelist; /* Page number to name mappings. */ +static SLIST_HEAD(, pagename) namelist;/* Page number to name mappings. */ static char format[MAX_FORMAT_SPEC]; /* Buffer for scsi cdb format def. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228408 - head/sbin/reboot
Author: ed Date: Sun Dec 11 11:42:44 2011 New Revision: 228408 URL: http://svn.freebsd.org/changeset/base/228408 Log: Let reboot(8) use getprogname() to compare the program name. While there, mark the global variable dohalt static, as reboot(8) only consists of a single C file. Modified: head/sbin/reboot/reboot.c Modified: head/sbin/reboot/reboot.c == --- head/sbin/reboot/reboot.c Sun Dec 11 11:38:50 2011(r228407) +++ head/sbin/reboot/reboot.c Sun Dec 11 11:42:44 2011(r228408) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); static void usage(void); static u_int get_pageins(void); -int dohalt; +static int dohalt; int main(int argc, char *argv[]) @@ -69,9 +69,9 @@ main(int argc, char *argv[]) const struct passwd *pw; int ch, howto, i, fd, lflag, nflag, qflag, sverrno; u_int pageins; - const char *p, *user, *kernel = NULL; + const char *user, *kernel = NULL; - if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) { + if (strcmp(getprogname(), "halt") == 0) { dohalt = 1; howto = RB_HALT; } else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228409 - head/tools/build/mk
Author: dim Date: Sun Dec 11 14:01:11 2011 New Revision: 228409 URL: http://svn.freebsd.org/changeset/base/228409 Log: Add more files to cleanup with 'make delete-old' when WITHOUT_CLANG is in effect. MFC after:1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Dec 11 11:42:44 2011(r228408) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Dec 11 14:01:11 2011(r228409) @@ -627,6 +627,8 @@ OLD_FILES+=usr/share/man/man8/zpool.8.gz .if ${MK_CLANG} == no OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ +OLD_FILES+=usr/bin/clang-cpp +OLD_FILES+=usr/bin/clang-tblgen OLD_FILES+=usr/bin/tblgen OLD_FILES+=usr/include/clang/2.8/emmintrin.h OLD_FILES+=usr/include/clang/2.8/mm_malloc.h @@ -634,6 +636,39 @@ OLD_FILES+=usr/include/clang/2.8/mmintri OLD_FILES+=usr/include/clang/2.8/pmmintrin.h OLD_FILES+=usr/include/clang/2.8/tmmintrin.h OLD_FILES+=usr/include/clang/2.8/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.8 +OLD_FILES+=usr/include/clang/2.9/emmintrin.h +OLD_FILES+=usr/include/clang/2.9/mm_malloc.h +OLD_FILES+=usr/include/clang/2.9/mmintrin.h +OLD_FILES+=usr/include/clang/2.9/pmmintrin.h +OLD_FILES+=usr/include/clang/2.9/tmmintrin.h +OLD_FILES+=usr/include/clang/2.9/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.9 +OLD_FILES+=usr/include/clang/3.0/altivec.h +OLD_FILES+=usr/include/clang/3.0/avxintrin.h +OLD_FILES+=usr/include/clang/3.0/emmintrin.h +OLD_FILES+=usr/include/clang/3.0/immintrin.h +OLD_FILES+=usr/include/clang/3.0/mm3dnow.h +OLD_FILES+=usr/include/clang/3.0/mm_malloc.h +OLD_FILES+=usr/include/clang/3.0/mmintrin.h +OLD_FILES+=usr/include/clang/3.0/nmmintrin.h +OLD_FILES+=usr/include/clang/3.0/pmmintrin.h +OLD_FILES+=usr/include/clang/3.0/smmintrin.h +OLD_FILES+=usr/include/clang/3.0/tmmintrin.h +OLD_FILES+=usr/include/clang/3.0/wmmintrin.h +OLD_FILES+=usr/include/clang/3.0/x86intrin.h +OLD_FILES+=usr/include/clang/3.0/xmmintrin.h +OLD_DIRS+=usr/include/clang/3.0 +OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT +OLD_DIRS+=usr/share/doc/llvm/clang +OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex +OLD_FILES+=usr/share/doc/llvm/LICENSE.TXT +OLD_DIRS+=usr/share/doc/llvm +OLD_FILES+=usr/share/man/man1/clang.1.gz +OLD_FILES+=usr/share/man/man1/clang++.1.gz +OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz +OLD_FILES+=usr/share/man/man1/tblgen.1.gz .endif .if ${MK_CPP} == no ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228411 - head/contrib/bsnmp/snmpd
Author: trociny Date: Sun Dec 11 17:10:33 2011 New Revision: 228411 URL: http://svn.freebsd.org/changeset/base/228411 Log: Include sys/queue.h: snmpmod.h uses TAILQ. PR: bin/153153 MFC after:2 weeks Modified: head/contrib/bsnmp/snmpd/snmpmod.h Modified: head/contrib/bsnmp/snmpd/snmpmod.h == --- head/contrib/bsnmp/snmpd/snmpmod.h Sun Dec 11 16:57:27 2011 (r228410) +++ head/contrib/bsnmp/snmpd/snmpmod.h Sun Dec 11 17:10:33 2011 (r228411) @@ -40,6 +40,7 @@ #define snmpmod_h_ #include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228412 - in head/sys/powerpc: aim include
Author: nwhitehorn Date: Sun Dec 11 17:19:48 2011 New Revision: 228412 URL: http://svn.freebsd.org/changeset/base/228412 Log: Keep track of PVO entries in each pmap, which allows much faster pmap_remove() for large sparse requests. This can prevent pmap_remove() operations on 64-bit process destruction or swapout that would take several hundred times the lifetime of the universe to complete. This behavior is largely indistinguishable from a hang. Modified: head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/aim/mmu_oea.c == --- head/sys/powerpc/aim/mmu_oea.c Sun Dec 11 17:10:33 2011 (r228411) +++ head/sys/powerpc/aim/mmu_oea.c Sun Dec 11 17:19:48 2011 (r228412) @@ -824,6 +824,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k for (i = 0; i < 16; i++) kernel_pmap->pm_sr[i] = EMPTY_SEGMENT + i; CPU_FILL(&kernel_pmap->pm_active); + LIST_INIT(&kernel_pmap->pmap_pvo); /* * Set up the Open Firmware mappings @@ -1582,6 +1583,7 @@ moea_pinit(mmu_t mmu, pmap_t pmap) KASSERT((int)pmap < VM_MIN_KERNEL_ADDRESS, ("moea_pinit: virt pmap")); PMAP_LOCK_INIT(pmap); + LIST_INIT(&pmap->pmap_pvo); entropy = 0; __asm __volatile("mftb %0" : "=r"(entropy)); @@ -1765,10 +1767,17 @@ moea_remove(mmu_t mmu, pmap_t pm, vm_off vm_page_lock_queues(); PMAP_LOCK(pm); - for (; sva < eva; sva += PAGE_SIZE) { - pvo = moea_pvo_find_va(pm, sva, &pteidx); - if (pvo != NULL) { - moea_pvo_remove(pvo, pteidx); + if ((eva - sva)/PAGE_SIZE < 10) { + for (; sva < eva; sva += PAGE_SIZE) { + pvo = moea_pvo_find_va(pm, sva, &pteidx); + if (pvo != NULL) + moea_pvo_remove(pvo, pteidx); + } + } else { + LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) + continue; + moea_pvo_remove(pvo, -1); } } PMAP_UNLOCK(pm); @@ -1931,6 +1940,11 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon moea_pte_create(&pvo->pvo_pte.pte, sr, va, pa | pte_lo); /* +* Add to pmap list +*/ + LIST_INSERT_HEAD(&pm->pmap_pvo, pvo, pvo_plink); + + /* * Remember if the list was empty and therefore will be the first * item. */ @@ -1996,9 +2010,10 @@ moea_pvo_remove(struct pvo_entry *pvo, i } /* -* Remove this PVO from the PV list. +* Remove this PVO from the PV and pmap lists. */ LIST_REMOVE(pvo, pvo_vlink); + LIST_REMOVE(pvo, pvo_plink); /* * Remove this from the overflow list and return it to the pool Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cSun Dec 11 17:10:33 2011 (r228411) +++ head/sys/powerpc/aim/mmu_oea64.cSun Dec 11 17:19:48 2011 (r228412) @@ -831,6 +831,7 @@ moea64_mid_bootstrap(mmu_t mmup, vm_offs kernel_pmap->pmap_phys = kernel_pmap; CPU_FILL(&kernel_pmap->pm_active); + LIST_INIT(&kernel_pmap->pmap_pvo); PMAP_LOCK_INIT(kernel_pmap); @@ -1855,6 +1856,7 @@ void moea64_pinit(mmu_t mmu, pmap_t pmap) { PMAP_LOCK_INIT(pmap); + LIST_INIT(&pmap->pmap_pvo); pmap->pm_slb_tree_root = slb_alloc_tree(); pmap->pm_slb = slb_alloc_user_cache(); @@ -1868,6 +1870,7 @@ moea64_pinit(mmu_t mmu, pmap_t pmap) uint32_t hash; PMAP_LOCK_INIT(pmap); + LIST_INIT(&pmap->pmap_pvo); if (pmap_bootstrapped) pmap->pmap_phys = (pmap_t)moea64_kextract(mmu, @@ -2034,10 +2037,18 @@ moea64_remove(mmu_t mmu, pmap_t pm, vm_o vm_page_lock_queues(); PMAP_LOCK(pm); - for (; sva < eva; sva += PAGE_SIZE) { - pvo = moea64_pvo_find_va(pm, sva); - if (pvo != NULL) + if ((eva - sva)/PAGE_SIZE < 10) { + for (; sva < eva; sva += PAGE_SIZE) { + pvo = moea64_pvo_find_va(pm, sva); + if (pvo != NULL) + moea64_pvo_remove(mmu, pvo); + } + } else { + LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) + continue; moea64_pvo_remove(mmu, pvo); + } } vm_page_unlock_queues(); PMAP_UNLOCK(pm); @@ -2231,6 +2242,11 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u (uint64_t
svn commit: r228413 - head/sys/powerpc/include
Author: nwhitehorn Date: Sun Dec 11 17:23:03 2011 New Revision: 228413 URL: http://svn.freebsd.org/changeset/base/228413 Log: Increase the available virtual address space for user programs on PowerPC AIM systems to 4 GB on 32-bit systems and 2^64 bytes on 64-bit systems. VM_MAXUSER_ADDRESS remains at 2 GB on pending Book-E, pending review of an increase to 3 GB by those more familiar with Book-E. Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h == --- head/sys/powerpc/include/vmparam.h Sun Dec 11 17:19:48 2011 (r228412) +++ head/sys/powerpc/include/vmparam.h Sun Dec 11 17:23:03 2011 (r228413) @@ -57,29 +57,34 @@ #defineMAXSSIZ (64*1024*1024) /* max stack size */ #endif +#ifdef AIM +#defineVM_MAXUSER_ADDRESS32((vm_offset_t)0xf000) +#else +#defineVM_MAXUSER_ADDRESS32((vm_offset_t)0x7000) +#endif + /* * Would like to have MAX addresses = 0, but this doesn't (currently) work */ #if !defined(LOCORE) #ifdef __powerpc64__ #defineVM_MIN_ADDRESS (0xUL) -#defineVM_MAXUSER_ADDRESS (0x7000UL) -#defineSHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE) +#defineVM_MAXUSER_ADDRESS (0xf000UL) #defineVM_MAX_ADDRESS (0xUL) #else #defineVM_MIN_ADDRESS ((vm_offset_t)0) -#defineVM_MAXUSER_ADDRESS ((vm_offset_t)0x7000) -#defineSHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE) -#defineVM_MAX_ADDRESS VM_MAXUSER_ADDRESS +#defineVM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS32 +#defineVM_MAX_ADDRESS ((vm_offset_t)0x) #endif +#defineSHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE) #else /* LOCORE */ -#ifndef __powerpc64__ +#if !defined(__powerpc64__) && defined(E500) #defineVM_MIN_ADDRESS 0 #defineVM_MAXUSER_ADDRESS 0x7000 #endif #endif /* LOCORE */ -#defineFREEBSD32_SHAREDPAGE(0x7000 - PAGE_SIZE) +#defineFREEBSD32_SHAREDPAGE(VM_MAXUSER_ADDRESS32 - PAGE_SIZE) #defineFREEBSD32_USRSTACK FREEBSD32_SHAREDPAGE #ifdef AIM ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228415 - head/sys/dev/e1000
Author: jfv Date: Sun Dec 11 18:46:14 2011 New Revision: 228415 URL: http://svn.freebsd.org/changeset/base/228415 Log: Last change still had an issue, one more time... Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Sun Dec 11 17:32:37 2011(r228414) +++ head/sys/dev/e1000/if_em.c Sun Dec 11 18:46:14 2011(r228415) @@ -1045,8 +1045,8 @@ em_ioctl(struct ifnet *ifp, u_long comma struct ifreq*ifr = (struct ifreq *)data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; - boolavoid_reset = FALSE; #endif + boolavoid_reset = FALSE; int error = 0; if (adapter->in_detach) @@ -1062,7 +1062,6 @@ em_ioctl(struct ifnet *ifp, u_long comma if (ifa->ifa_addr->sa_family == AF_INET6) avoid_reset = TRUE; #endif -#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -1071,11 +1070,12 @@ em_ioctl(struct ifnet *ifp, u_long comma ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) em_init(adapter); +#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); -#endif break; case SIOCSIFMTU: { Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Sun Dec 11 17:32:37 2011(r228414) +++ head/sys/dev/e1000/if_igb.c Sun Dec 11 18:46:14 2011(r228415) @@ -992,8 +992,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm struct ifreq*ifr = (struct ifreq *)data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; - boolavoid_reset = FALSE; #endif + boolavoid_reset = FALSE; int error = 0; if (adapter->in_detach) @@ -1009,7 +1009,6 @@ igb_ioctl(struct ifnet *ifp, u_long comm if (ifa->ifa_addr->sa_family == AF_INET6) avoid_reset = TRUE; #endif -#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -1018,11 +1017,12 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) igb_init(adapter); +#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); -#endif break; case SIOCSIFMTU: { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228416 - head/usr.sbin/powerd
Author: ed Date: Sun Dec 11 19:22:42 2011 New Revision: 228416 URL: http://svn.freebsd.org/changeset/base/228416 Log: Add missing static keyword. All global variables and functions in powerd are marked static, except this array of strings. Add the keyword, for consistency. Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c == --- head/usr.sbin/powerd/powerd.c Sun Dec 11 18:46:14 2011 (r228415) +++ head/usr.sbin/powerd/powerd.c Sun Dec 11 19:22:42 2011 (r228416) @@ -71,7 +71,7 @@ typedef enum { SRC_UNKNOWN, } power_src_t; -const char *modes[] = { +static const char *modes[] = { "AC", "battery", "unknown" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228417 - head/sbin/bsdlabel
Author: ed Date: Sun Dec 11 19:28:04 2011 New Revision: 228417 URL: http://svn.freebsd.org/changeset/base/228417 Log: Add missing static keyword. All global variables and functions are marked static. Simply because this is an enum, doesn't mean we can't do so as well. Modified: head/sbin/bsdlabel/bsdlabel.c Modified: head/sbin/bsdlabel/bsdlabel.c == --- head/sbin/bsdlabel/bsdlabel.c Sun Dec 11 19:22:42 2011 (r228416) +++ head/sbin/bsdlabel/bsdlabel.c Sun Dec 11 19:28:04 2011 (r228417) @@ -130,7 +130,7 @@ static int labelsoffset = LABELSECTOR; static int labeloffset = LABELOFFSET; static int bbsize = BBSIZE; -enum { +static enum { UNSPEC, EDIT, READ, RESTORE, WRITE, WRITEBOOT } op = UNSPEC; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228418 - head/share/man/man5
Author: gjb (doc committer) Date: Sun Dec 11 19:53:11 2011 New Revision: 228418 URL: http://svn.freebsd.org/changeset/base/228418 Log: Document the SVN variable needs to be set in make.conf(5) when SVN_UPDATE is set. PR: 163162 Submitted by: Oliver Hartmann Patch by: Benjamin Kaduk (original) MFC after:1 week Modified: head/share/man/man5/make.conf.5 Modified: head/share/man/man5/make.conf.5 == --- head/share/man/man5/make.conf.5 Sun Dec 11 19:28:04 2011 (r228417) +++ head/share/man/man5/make.conf.5 Sun Dec 11 19:53:11 2011 (r228418) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2011 +.Dd December 11, 2011 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -333,6 +333,12 @@ to update your .Pa src tree with .Dq Li "make update" . +Note that since a subversion client is not included in the base system, +you will need to set +.Va SVN +to the full path of a +.Xr svn 1 +binary. .It Va WWWSUPFILE .Pq Vt str The www ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228419 - head/share/man/man5
Author: gjb (doc committer) Date: Sun Dec 11 20:01:37 2011 New Revision: 228419 URL: http://svn.freebsd.org/changeset/base/228419 Log: Minor whitespace cleanup to make.conf(5). MFC after:1 week X-MFC-With: 228418 Modified: head/share/man/man5/make.conf.5 Modified: head/share/man/man5/make.conf.5 == --- head/share/man/man5/make.conf.5 Sun Dec 11 19:53:11 2011 (r228418) +++ head/share/man/man5/make.conf.5 Sun Dec 11 20:01:37 2011 (r228419) @@ -500,7 +500,7 @@ rather than load the server's kernel. .Pq Vt bool Defining this and recompiling .Pa /usr/src/sys/boot/i386 -will add +will add .Xr dcons 4 console driver to .Xr loader 8 @@ -640,7 +640,7 @@ The default value is 0640. .Pq Vt str Additional maps to rebuild when using .Pa /etc/mail/Makefile . -The +The .Pa access , .Pa bitdomain , .Pa domaintable , ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228422 - head/sbin/rcorder
Author: ed Date: Sun Dec 11 20:48:40 2011 New Revision: 228422 URL: http://svn.freebsd.org/changeset/base/228422 Log: Add more static keywords to rcorder(8). The global variables and functions provided by rcorder.c are not used in the other C files, as the other C files only provide memory allocation and hash functions. This reduces the binary size by 10%. Modified: head/sbin/rcorder/rcorder.c Modified: head/sbin/rcorder/rcorder.c == --- head/sbin/rcorder/rcorder.c Sun Dec 11 20:40:23 2011(r228421) +++ head/sbin/rcorder/rcorder.c Sun Dec 11 20:48:40 2011(r228422) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include "hash.h" #ifdef DEBUG -int debug = 0; +static int debug = 0; # define DPRINTF(args) if (debug) { fflush(stdout); fprintf args; } #else # define DPRINTF(args) @@ -124,33 +124,32 @@ struct filenode { strnodelist *keyword_list; }; -filenode fn_head_s, *fn_head; +static filenode fn_head_s, *fn_head; -strnodelist *bl_list; -strnodelist *keep_list; -strnodelist *skip_list; - -void do_file(filenode *fnode); -void strnode_add(strnodelist **, char *, filenode *); -int skip_ok(filenode *fnode); -int keep_ok(filenode *fnode); -void satisfy_req(f_reqnode *rnode, char *filename); -void crunch_file(char *); -void parse_require(filenode *, char *); -void parse_provide(filenode *, char *); -void parse_before(filenode *, char *); -void parse_keywords(filenode *, char *); -filenode *filenode_new(char *); -void add_require(filenode *, char *); -void add_provide(filenode *, char *); -void add_before(filenode *, char *); -void add_keyword(filenode *, char *); -void insert_before(void); -Hash_Entry *make_fake_provision(filenode *); -void crunch_all_files(void); -void initialize(void); -void generate_ordering(void); -int main(int, char *[]); +static strnodelist *bl_list; +static strnodelist *keep_list; +static strnodelist *skip_list; + +static void do_file(filenode *fnode); +static void strnode_add(strnodelist **, char *, filenode *); +static int skip_ok(filenode *fnode); +static int keep_ok(filenode *fnode); +static void satisfy_req(f_reqnode *rnode, char *filename); +static void crunch_file(char *); +static void parse_require(filenode *, char *); +static void parse_provide(filenode *, char *); +static void parse_before(filenode *, char *); +static void parse_keywords(filenode *, char *); +static filenode *filenode_new(char *); +static void add_require(filenode *, char *); +static void add_provide(filenode *, char *); +static void add_before(filenode *, char *); +static void add_keyword(filenode *, char *); +static void insert_before(void); +static Hash_Entry *make_fake_provision(filenode *); +static void crunch_all_files(void); +static void initialize(void); +static void generate_ordering(void); int main(int argc, char *argv[]) @@ -196,7 +195,7 @@ main(int argc, char *argv[]) /* * initialise various variables. */ -void +static void initialize(void) { @@ -207,7 +206,7 @@ initialize(void) } /* generic function to insert a new strnodelist element */ -void +static void strnode_add(strnodelist **listp, char *s, filenode *fnode) { strnodelist *ent; @@ -229,7 +228,7 @@ strnode_add(strnodelist **listp, char *s * we have a new filename, create a new filenode structure. * fill in the bits, and put it in the filenode linked list */ -filenode * +static filenode * filenode_new(char *filename) { filenode *temp; @@ -257,7 +256,7 @@ filenode_new(char *filename) /* * add a requirement to a filenode. */ -void +static void add_require(filenode *fnode, char *s) { Hash_Entry *entry; @@ -277,7 +276,7 @@ add_require(filenode *fnode, char *s) * add a provision to a filenode. if this provision doesn't * have a head node, create one here. */ -void +static void add_provide(filenode *fnode, char *s) { Hash_Entry *entry; @@ -356,7 +355,7 @@ add_provide(filenode *fnode, char *s) /* * put the BEFORE: lines to a list and handle them later. */ -void +static void add_before(filenode *fnode, char *s) { strnodelist *bf_ent; @@ -371,7 +370,7 @@ add_before(filenode *fnode, char *s) /* * add a key to a filenode. */ -void +static void add_keyword(filenode *fnode, char *s) { @@ -382,7 +381,7 @@ add_keyword(filenode *fnode, char *s) * loop over the rest of a REQUIRE line, giving each word to * add_require() to do the real work. */ -void +static void parse_require(filenode *node, char *buffer) { char *s; @@ -396,7 +395,7 @@ parse_require(filenode *node, char *buff * loop over the rest of a PROVIDE line, giving each word to * add_provide() to do the real work. */ -void +static void parse_provide(filenode *node, char *buffer) { char *s; @@ -410,7 +409,7 @@ parse_provide(filenode *node, char *buff * loop over the rest of a BEFORE line, giving each word to * add_before() to do the real work.
svn commit: r228423 - head/bin/chio
Author: ed Date: Sun Dec 11 20:53:12 2011 New Revision: 228423 URL: http://svn.freebsd.org/changeset/base/228423 Log: Add static keywords to chio(1). All other global variables are already marked static, so for consistency sake, add them to these three arrays as well. Modified: head/bin/chio/chio.c Modified: head/bin/chio/chio.c == --- head/bin/chio/chio.cSun Dec 11 20:48:40 2011(r228422) +++ head/bin/chio/chio.cSun Dec 11 20:53:12 2011(r228423) @@ -87,7 +87,7 @@ staticint do_voltag(const char *, int, #endif /* Valid changer element types. */ -const struct element_type elements[] = { +static const struct element_type elements[] = { { "drive", CHET_DT }, { "picker", CHET_MT }, { "portal", CHET_IE }, @@ -97,7 +97,7 @@ const struct element_type elements[] = { }; /* Valid commands. */ -const struct changer_command commands[] = { +static const struct changer_command commands[] = { { "exchange", do_exchange }, { "getpicker", do_getpicker }, { "ielem", do_ielem }, @@ -112,7 +112,7 @@ const struct changer_command commands[] }; /* Valid special words. */ -const struct special_word specials[] = { +static const struct special_word specials[] = { { "inv",SW_INVERT }, { "inv1", SW_INVERT1 }, { "inv2", SW_INVERT2 }, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228424 - in head/sys: kern sys
Author: avg Date: Sun Dec 11 21:02:01 2011 New Revision: 228424 URL: http://svn.freebsd.org/changeset/base/228424 Log: panic: add a switch and infrastructure for stopping other CPUs in SMP case Historical behavior of letting other CPUs merily go on is a default for time being. The new behavior can be switched on via kern.stop_scheduler_on_panic tunable and sysctl. Stopping of the CPUs has (at least) the following benefits: - more of the system state at panic time is preserved intact - threads and interrupts do not interfere with dumping of the system state Only one thread runs uninterrupted after panic if stop_scheduler_on_panic is set. That thread might call code that is also used in normal context and that code might use locks to prevent concurrent execution of certain parts. Those locks might be held by the stopped threads and would never be released. To work around this issue, it was decided that instead of explicit checks for panic context, we would rather put those checks inside the locking primitives. This change has substantial portions written and re-written by attilio and kib at various times. Other changes are heavily based on the ideas and patches submitted by jhb and mdf. bde has provided many insights into the details and history of the current code. The new behavior may cause problems for systems that use a USB keyboard for interfacing with system console. This is because of some unusual locking patterns in the ukbd code which have to be used because on one hand ukbd is below syscons, but on the other hand it has to interface with other usb code that uses regular mutexes/Giant for its concurrency protection. Dumping to USB-connected disks may also be affected. PR: amd64/139614 (at least) In cooperation with: attilio, jhb, kib, mdf Discussed with: arch@, bde Tested by:Eugene Grosbein , gnn, Steven Hartland , glebius, Andrew Boyer (various versions of the patch) MFC after:3 months (or never) Modified: head/sys/kern/kern_lock.c head/sys/kern/kern_mutex.c head/sys/kern/kern_rmlock.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_shutdown.c head/sys/kern/kern_sx.c head/sys/kern/kern_synch.c head/sys/kern/subr_kdb.c head/sys/kern/subr_lock.c head/sys/kern/subr_witness.c head/sys/sys/lockstat.h head/sys/sys/mutex.h head/sys/sys/systm.h Modified: head/sys/kern/kern_lock.c == --- head/sys/kern/kern_lock.c Sun Dec 11 20:53:12 2011(r228423) +++ head/sys/kern/kern_lock.c Sun Dec 11 21:02:01 2011(r228424) @@ -1232,6 +1232,9 @@ _lockmgr_disown(struct lock *lk, const c { uintptr_t tid, x; + if (SCHEDULER_STOPPED()) + return; + tid = (uintptr_t)curthread; _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line); Modified: head/sys/kern/kern_mutex.c == --- head/sys/kern/kern_mutex.c Sun Dec 11 20:53:12 2011(r228423) +++ head/sys/kern/kern_mutex.c Sun Dec 11 21:02:01 2011(r228424) @@ -192,6 +192,8 @@ void _mtx_lock_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); @@ -211,6 +213,9 @@ _mtx_lock_flags(struct mtx *m, int opts, void _mtx_unlock_flags(struct mtx *m, int opts, const char *file, int line) { + + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_unlock() of destroyed mutex @ %s:%d", file, line)); @@ -232,6 +237,8 @@ void _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock_spin() of destroyed mutex @ %s:%d", file, line)); @@ -254,6 +261,8 @@ void _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line) { + if (SCHEDULER_STOPPED()) + return; MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_unlock_spin() of destroyed mutex @ %s:%d", file, line)); @@ -282,6 +291,9 @@ mtx_trylock_flags_(struct mtx *m, int op #endif int rval; + if (SCHEDULER_STOPPED()) + return (1); + MPASS(curthread != NULL); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); @@ -338,6 +350,9 @@ _mtx_lock_sleep(st
svn commit: r228425 - head/usr.sbin/vidcontrol
Author: ed Date: Sun Dec 11 21:02:33 2011 New Revision: 228425 URL: http://svn.freebsd.org/changeset/base/228425 Log: Add static keywords to vidcontrol(1). While there, remove the false optimisation of the colors array. It seems that changing it to an array of pointers instead of a 16x16 array does not cause any increase in binary size at all. Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c == --- head/usr.sbin/vidcontrol/vidcontrol.c Sun Dec 11 21:02:01 2011 (r228424) +++ head/usr.sbin/vidcontrol/vidcontrol.c Sun Dec 11 21:02:33 2011 (r228425) @@ -63,7 +63,7 @@ static const char rcsid[] = /* Screen dump file format revision */ #define DUMP_FMT_REV 1 -char legal_colors[16][16] = { +static const char *legal_colors[16] = { "black", "blue", "green", "cyan", "red", "magenta", "brown", "white", "grey", "lightblue", "lightgreen", "lightcyan", @@ -78,18 +78,16 @@ struct { struct video_info video_mode_info; } cur_info; -inthex = 0; -intnumber; -intvesa_cols; -intvesa_rows; -intfont_height; -intcolors_changed; -intvideo_mode_changed; -intnormal_fore_color, normal_back_color; -intrevers_fore_color, revers_back_color; -char letter; -struct vid_info info; -struct video_info new_mode_info; +static int hex = 0; +static int vesa_cols; +static int vesa_rows; +static int font_height; +static int colors_changed; +static int video_mode_changed; +static int normal_fore_color, normal_back_color; +static int revers_fore_color, revers_back_color; +static struct vid_info info; +static struct video_info new_mode_info; /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228426 - head/sys/dev/syscons
Author: avg Date: Sun Dec 11 21:10:11 2011 New Revision: 228426 URL: http://svn.freebsd.org/changeset/base/228426 Log: syscons: make sc_puts static as it is used only privately Perhaps sc_puts should also be renamed to scputs to follow the implied naming conventions in the file... MFC after:2 weeks Modified: head/sys/dev/syscons/syscons.c head/sys/dev/syscons/syscons.h Modified: head/sys/dev/syscons/syscons.c == --- head/sys/dev/syscons/syscons.c Sun Dec 11 21:02:33 2011 (r228425) +++ head/sys/dev/syscons/syscons.c Sun Dec 11 21:10:11 2011 (r228426) @@ -185,6 +185,7 @@ static void scshutdown(void *, int); static void scsuspend(void *); static void scresume(void *); static u_int scgetc(sc_softc_t *sc, u_int flags); +static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel); #define SCGETC_CN 1 #define SCGETC_NONBLOCK2 static void sccnupdate(scr_stat *scp); @@ -2603,7 +2604,7 @@ exchange_scr(sc_softc_t *sc) mark_all(scp); } -void +static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel) { int need_unlock = 0; Modified: head/sys/dev/syscons/syscons.h == --- head/sys/dev/syscons/syscons.h Sun Dec 11 21:02:33 2011 (r228425) +++ head/sys/dev/syscons/syscons.h Sun Dec 11 21:10:11 2011 (r228426) @@ -562,7 +562,6 @@ voidsc_save_font(scr_stat *scp, int pa void sc_show_font(scr_stat *scp, int page); void sc_touch_scrn_saver(void); -void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel); void sc_draw_cursor_image(scr_stat *scp); void sc_remove_cursor_image(scr_stat *scp); void sc_set_cursor_image(scr_stat *scp); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r228330 - in head: include sys/sys
On 08.12.11 21:40, Andreas Tobler wrote: On 07.12.11 22:17, David Chisnall wrote: Author: theraven Date: Wed Dec 7 21:17:50 2011 New Revision: 228330 URL: http://svn.freebsd.org/changeset/base/228330 Log: As per das@'s suggestion, s/__noreturn/_Noreturn/, since the latter is an identifier reserved for the implementation in C99 and earlier so there is no sensible reason for introducing yet another reserved identifier when we could just use the one C1x uses. Approved by:brooks (mentor) Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hWed Dec 7 21:02:35 2011(r228329) +++ head/sys/sys/cdefs.hWed Dec 7 21:17:50 2011(r228330) @@ -220,13 +220,13 @@ #if defined(__cplusplus)&& __cplusplus>= 201103L -#define__noreturn [[noreturn]] +#define_Noreturn [[noreturn]] #elif defined(__STDC_VERSION__)&& __STDC_VERSION__> 201000L -#define__noreturn _Noreturn +/* Do nothing - _Noreturn is a keyword */ #elif defined(__GNUC__) -#define__noreturn __attribute__((__noreturn__)) +#define_Noreturn __attribute__((__noreturn__)) This and the previous commit broke bootstrapping gcc. The problem is this: /export/devel/build/gcc/head/objdir/./gcc/include-fixed/stdlib.h:96:1: error: expected unqualified-id before '[' token Line in question is: _Noreturn void abort(void); Where _Noreturn gets expanded to [[noreturn]] I helped myself with adding the below. Well. No clue if it is correct. But at least I can continue building gcc trunk. As far as I understand, GCC does not support this attribute [[noreturn]] yet. But it defines both, __cplusplus and __cplusplus=201103L. On gcc-4.7 __cplusplus=201103L is the default when we build libstdc++. So I think we have to extend the check as below or we can reorder the defines that GNUC is before the __cplusplus && __cplusplus>= 201103L. I'd appreciate any comments on this. Thanks, Andreas Index: cdefs.h === --- cdefs.h (revision 228352) +++ cdefs.h (working copy) @@ -219,7 +219,7 @@ #endif -#if defined(__cplusplus)&& __cplusplus>= 201103L +#if defined(__cplusplus)&& __cplusplus>= 201103L&& !defined(__GNUC__) #define _Noreturn [[noreturn]] #elif defined(__STDC_VERSION__)&& __STDC_VERSION__> 201000L /* Do nothing - _Noreturn is a keyword */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r228330 - in head: include sys/sys
* David Chisnall , 20111207 22:17: > As per das@'s suggestion, s/__noreturn/_Noreturn/, since the latter is an > identifier reserved for the implementation in C99 and earlier so there is > no sensible reason for introducing yet another reserved identifier when we > could just use the one C1x uses. So this is the same as __dead2, right? Maybe we should do a sweep of the tree and replace all __dead2's by _Noreturn? -- Ed Schouten WWW: http://80386.nl/ pgp4aakqdFdqD.pgp Description: PGP signature
svn commit: r228430 - head/sys/kern
Author: avg Date: Mon Dec 12 07:46:10 2011 New Revision: 228430 URL: http://svn.freebsd.org/changeset/base/228430 Log: kern_racct: move sys/systm.h inclusion to its proper place This should fix the build failure introduced with r228424. Also remove duplicate inclusion of sys/param.h. Pointyhat to: avg MFC after:1 week Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c == --- head/sys/kern/kern_racct.c Sun Dec 11 23:19:57 2011(r228429) +++ head/sys/kern/kern_racct.c Mon Dec 12 07:46:10 2011(r228430) @@ -35,8 +35,8 @@ __FBSDID("$FreeBSD$"); #include "opt_kdtrace.h" #include +#include #include -#include #include #include #include @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RCTL ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"