CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Sat Jul 18 06:31:54 UTC 2009 Modified Files: src/share/man/man4: ip.4 Log Message: Make HTML-ready. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/share/man/man4/ip.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ip.4 diff -u src/share/man/man4/ip.4:1.27 src/share/man/man4/ip.4:1.28 --- src/share/man/man4/ip.4:1.27 Fri Jul 17 22:04:18 2009 +++ src/share/man/man4/ip.4 Sat Jul 18 06:31:54 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: ip.4,v 1.27 2009/07/17 22:04:18 minskim Exp $ +.\ $NetBSD: ip.4,v 1.28 2009/07/18 06:31:54 wiz Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -198,7 +198,7 @@ To discard all packets with a TTL lower than 255: .Bd -literal -offset indent int minttl = 255; -setsockopt(s, IPPROTO_IP, IP_MINTTL, minttl, sizeof(minttl)); +setsockopt(s, IPPROTO_IP, IP_MINTTL, \*[Am]minttl, sizeof(minttl)); .Ed .Ss MULTICAST OPTIONS .Tn IP
CVS commit: src/usr.sbin/wake
Module Name:src Committed By: mbalmer Date: Sat Jul 18 08:35:20 UTC 2009 Modified Files: src/usr.sbin/wake: wake.c Log Message: Use EXIT_FAILURE/EXIT_SUCCESS instead of numerical values when exiting. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/wake/wake.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/wake/wake.c diff -u src/usr.sbin/wake/wake.c:1.7 src/usr.sbin/wake/wake.c:1.8 --- src/usr.sbin/wake/wake.c:1.7 Wed Jul 1 07:49:12 2009 +++ src/usr.sbin/wake/wake.c Sat Jul 18 08:35:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: wake.c,v 1.7 2009/07/01 07:49:12 mbalmer Exp $ */ +/* $NetBSD: wake.c,v 1.8 2009/07/18 08:35:19 mbalmer Exp $ */ /* * Copyright (C) 2006, 2007, 2008, 2009 Marc Balmer m...@msys.ch @@ -70,7 +70,7 @@ usage(void) { (void)fprintf(stderr, usage: %s interface lladdr\n, getprogname()); - exit(0); + exit(EXIT_FAILURE); } static int @@ -160,14 +160,14 @@ usage(); if ((bpf = open(_PATH_BPF, O_RDWR)) == -1) - err(1, Cannot open bpf interface); + err(EXIT_FAILURE, Cannot open bpf interface); if (bind_if_to_bpf(argv[1], bpf) == -1) - err(1, Cannot bind to interface `%s', argv[1]); + err(EXIT_FAILURE, Cannot bind to interface `%s', argv[1]); for (n = 2; n argc; n++) if (wake(bpf, argv[n])) warn(Cannot send Wake on LAN frame over `%s' to `%s', argv[1], argv[n]); - return 0; + return EXIT_SUCCESS; }
CVS commit: src/regress/lib/libc/string/strchr
Module Name:src Committed By: dsl Date: Sat Jul 18 09:20:46 UTC 2009 Modified Files: src/regress/lib/libc/string/strchr: strchr_test.c Log Message: Add tests that scan for 0x0 and 0xff. Remove the 'answers' section from the test definition, instead use our own version of strchr() to determine the what the answer should be. On error report which test we are doing, and the answer we got. If symbol test_strchr exists, test that function instead of strchr(). (With a very dodgy strchr() other things fail badly. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/regress/lib/libc/string/strchr/strchr_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/lib/libc/string/strchr/strchr_test.c diff -u src/regress/lib/libc/string/strchr/strchr_test.c:1.3 src/regress/lib/libc/string/strchr/strchr_test.c:1.4 --- src/regress/lib/libc/string/strchr/strchr_test.c:1.3 Sat Jul 18 04:34:32 2009 +++ src/regress/lib/libc/string/strchr/strchr_test.c Sat Jul 18 09:20:46 2009 @@ -28,232 +28,263 @@ #include assert.h #include string.h +#include stdio.h +#include stdlib.h +#include dlfcn.h -extern char *xstrchr(const char *, int); -void check_strchr(void); +char * (*volatile strchr_fn)(const char *, int); -/* try to trick the compiler */ -char * (*volatile f)(const char *, int); +static int a; +static int t; -void +static char * +slow_strchr(char *buf, int ch) +{ +unsigned char c = 1; + +ch = 0xff; + +for (; c != 0; buf++) { + c = *buf; + if (c == ch) + return buf; +} +return 0; +} + +static void +verify_strchr(char *buf, int ch) +{ +const char *off, *ok_off; + +off = strchr_fn(buf, ch); +ok_off = slow_strchr(buf, ch); +if (off == ok_off) + return; + +fprintf(stderr, test_strchr(\%s\, %#x) gave %zd not %zd (test %d, alignment %d)\n, + buf, ch, off ? off - buf : -1, ok_off ? ok_off - buf : -1, t, a); + +exit(1); +} + +static void check_strchr(void) { -int a; -int t; -char* off; +char *off; char buf[32]; -struct tab { - const char* val; - char match; - size_t f_off; /* offset of first match */ - size_t l_off; /* offset of last match */ -}; +const char *tab[] = { + , + a, + aa, + abc, + abcd, + abcde, + abcdef, + abcdefg, + abcdefgh, -const struct tab tab[] = { - { , 0, 0, 0 }, - { a, 0, 0, 0 }, - { aa, 0, 0, 0 }, - { abc, 0, 0, 0 }, - { abcd, 0, 0, 0 }, - { abcde, 0, 0, 0 }, - { abcdef, 0, 0, 0 }, - { abcdefg, 0, 0, 0 }, - { abcdefgh, 0, 0, 0 }, - - { /, 1, 0, 0 }, - { //, 1, 0, 1 }, - { /a, 1, 0, 0 }, - { /a/,1, 0, 2 }, - { /ab,1, 0, 0 }, - { /ab/, 1, 0, 3 }, - { /abc, 1, 0, 0 }, - { /abc/, 1, 0, 4 }, - { /abcd, 1, 0, 0 }, - { /abcd/, 1, 0, 5 }, - { /abcde, 1, 0, 0 }, - { /abcde/,1, 0, 6 }, - { /abcdef,1, 0, 0 }, - { /abcdef/, 1, 0, 7 }, - { /abcdefg, 1, 0, 0 }, - { /abcdefg/, 1, 0, 8 }, - { /abcdefgh, 1, 0, 0 }, - { /abcdefgh/, 1, 0, 9 }, - - { a/, 1, 1, 1 }, - { a//,1, 1, 2 }, - { a/a,1, 1, 1 }, - { a/a/, 1, 1, 3 }, - { a/ab, 1, 1, 1 }, - { a/ab/, 1, 1, 4 }, - { a/abc, 1, 1, 1 }, - { a/abc/, 1, 1, 5 }, - { a/abcd, 1, 1, 1 }, - { a/abcd/,1, 1, 6 }, - { a/abcde,1, 1, 1 }, - { a/abcde/, 1, 1, 7 }, - { a/abcdef, 1, 1, 1 }, - { a/abcdef/, 1, 1, 8 }, - { a/abcdefg, 1, 1, 1 }, - { a/abcdefg/, 1, 1, 9 }, - { a/abcdefgh, 1, 1, 1 }, - { a/abcdefgh/,1, 1, 10 }, - - { ab/,1, 2, 2 }, - { ab//, 1, 2, 3 }, - { ab/a, 1, 2, 2 }, - { ab/a/, 1, 2, 4 }, - { ab/ab, 1, 2, 2 }, - { ab/ab/, 1, 2, 5 }, - { ab/abc, 1, 2, 2 }, - { ab/abc/,1, 2, 6 }, - { ab/abcd,1, 2, 2 }, - { ab/abcd/, 1, 2, 7 }, - { ab/abcde, 1, 2, 2 }, - { ab/abcde/, 1, 2, 8 }, - { ab/abcdef, 1, 2, 2 }, - { ab/abcdef/, 1, 2, 9 }, - { ab/abcdefg, 1, 2, 2 }, - { ab/abcdefg/,1, 2, 10 }, - { ab/abcdefgh,1, 2, 2 }, - { ab/abcdefgh/, 1, 2, 11 }, - - { abc/, 1, 3, 3 }, - { abc//, 1, 3, 4 }, - { abc/a, 1, 3, 3 }, - { abc/a/, 1, 3, 5 }, - { abc/ab, 1, 3, 3 }, - { abc/ab/,1, 3, 6 }, - { abc/abc,1, 3, 3 }, - { abc/abc/, 1, 3, 7 }, - { abc/abcd, 1, 3, 3 }, - { abc/abcd/, 1, 3, 8 }, - { abc/abcde, 1, 3, 3 }, - { abc/abcde/, 1, 3, 9 }, - { abc/abcdef, 1, 3, 3 }, - { abc/abcdef/,1, 3, 10
CVS commit: src/lib/libc/string
Module Name:src Committed By: dsl Date: Sat Jul 18 09:41:23 UTC 2009 Modified Files: src/lib/libc/string: Makefile.inc Log Message: Remove index() and rindex() from the list (in comment) To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/lib/libc/string/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/string/Makefile.inc diff -u src/lib/libc/string/Makefile.inc:1.71 src/lib/libc/string/Makefile.inc:1.72 --- src/lib/libc/string/Makefile.inc:1.71 Fri May 1 17:27:01 2009 +++ src/lib/libc/string/Makefile.inc Sat Jul 18 09:41:23 2009 @@ -1,5 +1,5 @@ # from: @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $NetBSD: Makefile.inc,v 1.71 2009/05/01 17:27:01 perry Exp $ +# $NetBSD: Makefile.inc,v 1.72 2009/07/18 09:41:23 dsl Exp $ # string sources .PATH: ${ARCHDIR}/string ${.CURDIR}/string @@ -25,8 +25,8 @@ # machine-dependent net sources # m-d Makefile.inc must include sources for: -# bcmp() bcopy() bzero() ffs() index() memchr() memcmp() memset() -# rindex() strcat() strcmp() strcpy() strcspn() strlen() +# bcmp() bcopy() bzero() ffs() memchr() memcmp() memset() +# strcat() strcmp() strcpy() strcspn() strlen() # strncat() strncmp() strncpy() strpbrk() strsep() # strspn() strstr() swav() # m-d Makefile.inc may include sources for:
CVS commit: src/lib/libc/arch
Module Name:src Committed By: dsl Date: Sat Jul 18 09:44:31 UTC 2009 Modified Files: src/lib/libc/arch/alpha/string: Makefile.inc src/lib/libc/arch/arm/string: Makefile.inc src/lib/libc/arch/hppa/string: Makefile.inc src/lib/libc/arch/ia64/string: Makefile.inc src/lib/libc/arch/powerpc/string: Makefile.inc src/lib/libc/arch/powerpc64/string: Makefile.inc src/lib/libc/arch/sh3/string: Makefile.inc src/lib/libc/arch/sparc/string: Makefile.inc src/lib/libc/arch/sparc64/string: Makefile.inc Log Message: Remove references to index.c and rindex.c (strchr.c and strrchr.c now provide the definitions). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/alpha/string/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/string/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/hppa/string/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/ia64/string/Makefile.inc cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/powerpc/string/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/powerpc64/string/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/sh3/string/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/sparc/string/Makefile.inc cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/sparc64/string/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/alpha/string/Makefile.inc diff -u src/lib/libc/arch/alpha/string/Makefile.inc:1.4 src/lib/libc/arch/alpha/string/Makefile.inc:1.5 --- src/lib/libc/arch/alpha/string/Makefile.inc:1.4 Mon Jul 15 03:13:18 1996 +++ src/lib/libc/arch/alpha/string/Makefile.inc Sat Jul 18 09:44:30 2009 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.4 1996/07/15 03:13:18 cgd Exp $ +# $NetBSD: Makefile.inc,v 1.5 2009/07/18 09:44:30 dsl Exp $ -SRCS+= bcmp.c bcopy.S bzero.S ffs.S index.c memchr.c memcmp.c memset.c \ - rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.c \ +SRCS+= bcmp.c bcopy.S bzero.S ffs.S memchr.c memcmp.c memset.c \ + strcat.c strcmp.c strcpy.c strcspn.c strlen.c \ strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \ strspn.c strstr.c swab.c SRCS+= memcpy.S memmove.S Index: src/lib/libc/arch/arm/string/Makefile.inc diff -u src/lib/libc/arch/arm/string/Makefile.inc:1.6 src/lib/libc/arch/arm/string/Makefile.inc:1.7 --- src/lib/libc/arch/arm/string/Makefile.inc:1.6 Tue Oct 14 07:51:45 2003 +++ src/lib/libc/arch/arm/string/Makefile.inc Sat Jul 18 09:44:30 2009 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.6 2003/10/14 07:51:45 scw Exp $ +# $NetBSD: Makefile.inc,v 1.7 2009/07/18 09:44:30 dsl Exp $ SRCS+= memcpy.S bcopy.S memmove.S memset.S bzero.S ffs.S strcmp.S SRCS+= strncmp.S memcmp.S -SRCS+= bcmp.c index.c memchr.c \ - rindex.c strcat.c strcpy.c strcspn.c strlen.c \ +SRCS+= bcmp.c memchr.c \ + strcat.c strcpy.c strcspn.c strlen.c \ strncat.c strncpy.c strpbrk.c strsep.c \ strspn.c strstr.c swab.c Index: src/lib/libc/arch/hppa/string/Makefile.inc diff -u src/lib/libc/arch/hppa/string/Makefile.inc:1.1 src/lib/libc/arch/hppa/string/Makefile.inc:1.2 --- src/lib/libc/arch/hppa/string/Makefile.inc:1.1 Thu Jun 6 20:31:22 2002 +++ src/lib/libc/arch/hppa/string/Makefile.inc Sat Jul 18 09:44:30 2009 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.1 2002/06/06 20:31:22 fredette Exp $ +# $NetBSD: Makefile.inc,v 1.2 2009/07/18 09:44:30 dsl Exp $ # $OpenBSD: Makefile.inc,v 1.4 1999/09/14 00:46:18 mickey Exp $ -SRCS+= memchr.c memcmp.c memset.c index.c rindex.c \ +SRCS+= memchr.c memcmp.c memset.c \ strcat.c strcmp.c strcpy.c strcspn.c strlen.c \ strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \ strspn.c strstr.c swab.c Index: src/lib/libc/arch/ia64/string/Makefile.inc diff -u src/lib/libc/arch/ia64/string/Makefile.inc:1.2 src/lib/libc/arch/ia64/string/Makefile.inc:1.3 --- src/lib/libc/arch/ia64/string/Makefile.inc:1.2 Fri Sep 22 12:09:25 2006 +++ src/lib/libc/arch/ia64/string/Makefile.inc Sat Jul 18 09:44:30 2009 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.2 2006/09/22 12:09:25 cherry Exp $ +# $NetBSD: Makefile.inc,v 1.3 2009/07/18 09:44:30 dsl Exp $ -SRCS+= bcmp.c bcopy.c index.c memchr.c memcmp.c memset.c \ - rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.c \ +SRCS+= bcmp.c bcopy.c memchr.c memcmp.c memset.c \ + strcat.c strcmp.c strcpy.c strcspn.c strlen.c \ strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \ strspn.c strstr.c swab.c Index: src/lib/libc/arch/powerpc/string/Makefile.inc diff -u src/lib/libc/arch/powerpc/string/Makefile.inc:1.8 src/lib/libc/arch/powerpc/string/Makefile.inc:1.9 --- src/lib/libc/arch/powerpc/string/Makefile.inc:1.8 Fri Apr 18 08:05:05 2008 +++ src/lib/libc/arch/powerpc/string/Makefile.inc Sat Jul 18 09:44:30 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2008/04/18 08:05:05 garbled Exp $ +# $NetBSD: Makefile.inc,v 1.9 2009/07/18 09:44:30 dsl Exp $ # disable the asm
CVS commit: src
Module Name:src Committed By: dsl Date: Sat Jul 18 09:50:32 UTC 2009 Modified Files: src: UPDATING Log Message: Presence of index.o in existing libc.a causes duplicate symbol now that strchr.[cS] provides its definition. To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.201 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.200 src/UPDATING:1.201 --- src/UPDATING:1.200 Thu Jul 9 08:04:32 2009 +++ src/UPDATING Sat Jul 18 09:50:32 2009 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.200 2009/07/09 08:04:32 dholland Exp $ +$NetBSD: UPDATING,v 1.201 2009/07/18 09:50:32 dsl Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -16,6 +16,12 @@ Recent changes: ^^^ +20090718: + libc build changed so that strchr() provides the extra entry + point for index(). Update build of libc.a (and libc_pic.a) + may fail because the archive contains the unwanted index.o. + (Similarly for strrchr() and rindex().) + 20090709: Native Xorg was upgraded again. Builds will probably fail again without a clean objdir, at least for src/external/mit/xorg.
CVS commit: src/common/lib/libc/arch/x86_64/string
Module Name:src Committed By: dsl Date: Sat Jul 18 11:41:23 UTC 2009 Modified Files: src/common/lib/libc/arch/x86_64/string: strchr.S Log Message: Replace with a version that: 1) doesn't do byte compares to find which byte matched 2) doesn't do byte compares if any top bits are set 3) doesn't use a loop when the input is misaligned 4) has less mispredicted branches Passes regression tests and 'build.sh' doesn't explode (and more than usual). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/x86_64/string/strchr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/x86_64/string/strchr.S diff -u src/common/lib/libc/arch/x86_64/string/strchr.S:1.2 src/common/lib/libc/arch/x86_64/string/strchr.S:1.3 --- src/common/lib/libc/arch/x86_64/string/strchr.S:1.2 Fri Jul 17 19:37:57 2009 +++ src/common/lib/libc/arch/x86_64/string/strchr.S Sat Jul 18 11:41:23 2009 @@ -1,133 +1,153 @@ -/* - * Written by J.T. Conklin j...@acorntoolworks.com - * Public domain. +/* $NetBSD: strchr.S,v 1.3 2009/07/18 11:41:23 dsl Exp $ */ + +/*- + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by David Laight. + * + * 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. */ +/* See comments in strlen.S about checking words for byte values */ + #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: strchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $) + RCSID($NetBSD: strchr.S,v 1.3 2009/07/18 11:41:23 dsl Exp $) #endif -ENTRY(strchr) - movzbq %sil,%rcx - - /* - * Align to word boundary. - * Consider unrolling loop? - */ -.Lalign: - testb $7,%dil - je .Lword_aligned - movb (%rdi),%dl - cmpb %cl,%dl - je .Ldone - incq %rdi - testb %dl,%dl - jne .Lalign - jmp .Lzero - -.Lword_aligned: - /* copy char to all bytes in word */ - movb %cl,%ch - movq %rcx,%rdx - salq $16,%rcx - orq %rdx,%rcx - movq %rcx,%rdx - salq $32,%rcx - orq %rdx,%rcx +/* + * On entry %rdi is the buffer and the low byte of %rsi (%sil) the + * character to search for. + * + * Registers %rdx, %rcx, %r8-%r11 and %rax are also usable + */ +/* Uncomment below to get regression test to run this version but + * have everything else use the trivial one below. */ +/* #define TEST_STRCHR */ + +#ifdef TEST_STRCHR +ENTRY(test_strchr) +#else +ENTRY(strchr) +#endif movabsq $0x0101010101010101,%r8 - movabsq $0x8080808080808080,%r9 - /* Check whether any byte in the word is equal to ch or 0. */ - _ALIGN_TEXT -.Lloop: - movq (%rdi),%rdx + movzbq %sil,%rdx /* value to search for (c) */ + imul $0x80,%r8,%r9 /* 0x8080808080808080 */ + imul %r8,%rdx /* (c) copied to all bytes */ + test $7,%dil + jnz 20f /* jump if misaligned */ + + _ALIGN_TEXT /* one byte nop */ +1: + movq (%rdi),%rax /* bytes to check (x) */ +2: addq $8,%rdi - movq %rdx,%rsi - subq %r8,%rdx - xorq %rcx,%rsi - subq %r8,%rsi - orq %rsi,%rdx - testq %r9,%rdx - je .Lloop - - /* - * In rare cases, the above loop may exit prematurely. We must - * return to the loop if none of the bytes in the word match - * ch or are equal to 0. - */ - - movb -8(%rdi),%dl - cmpb %cl,%dl /* 1st byte == ch? */ - jne 1f - subq $8,%rdi - jmp .Ldone -1: testb %dl,%dl /* 1st byte == 0? */ - je .Lzero - - movb -7(%rdi),%dl - cmpb %cl,%dl /* 2nd byte == ch? */ - jne 1f - subq $7,%rdi - jmp .Ldone -1: testb %dl,%dl /* 2nd byte == 0? */ - je .Lzero - - movb -6(%rdi),%dl - cmpb %cl,%dl /* 3rd byte == ch? */ - jne 1f - subq $6,%rdi - jmp .Ldone -1: testb %dl,%dl /* 3rd byte == 0? */ - je .Lzero - - movb
CVS commit: src/common/lib/libc/arch/x86_64/string
Module Name:src Committed By: dsl Date: Sat Jul 18 12:03:31 UTC 2009 Modified Files: src/common/lib/libc/arch/x86_64/string: ffs.S Log Message: Remove a pointless _ALIGN_TEXT. XXX ffs() ought to be a gcc inline asm. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/x86_64/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/x86_64/string/ffs.S diff -u src/common/lib/libc/arch/x86_64/string/ffs.S:1.1 src/common/lib/libc/arch/x86_64/string/ffs.S:1.2 --- src/common/lib/libc/arch/x86_64/string/ffs.S:1.1 Tue Dec 20 19:28:51 2005 +++ src/common/lib/libc/arch/x86_64/string/ffs.S Sat Jul 18 12:03:31 2009 @@ -7,15 +7,14 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: ffs.S,v 1.1 2005/12/20 19:28:51 christos Exp $) + RCSID($NetBSD: ffs.S,v 1.2 2009/07/18 12:03:31 dsl Exp $) #endif ENTRY(ffs) bsfl %edi,%eax - jz L1 /* ZF is set if all bits are 0 */ + jz 1f /* ZF is set if all bits are 0 */ incl %eax /* bits numbered from 1, not 0 */ ret - _ALIGN_TEXT -L1: xorl %eax,%eax /* clear result */ +1: xorl %eax,%eax /* clear result */ ret
CVS commit: [yamt-nfs-mp] src/sys
Module Name:src Committed By: yamt Date: Sat Jul 18 14:53:28 UTC 2009 Modified Files: src/sys/arch/amd64/amd64 [yamt-nfs-mp]: trap.c vector.S src/sys/arch/atari/atari [yamt-nfs-mp]: atari_init.c intr.c src/sys/arch/atari/dev [yamt-nfs-mp]: atari5380.c clock.c dma.c hdfd.c kbd.c kbdvar.h lpt.c md_root.c ser.c src/sys/arch/atari/include [yamt-nfs-mp]: intr.h isa_machdep.h pci_machdep.h src/sys/arch/atari/vme [yamt-nfs-mp]: if_le_vme.c src/sys/arch/i386/conf [yamt-nfs-mp]: XEN2_DOMU XEN3_DOMU src/sys/arch/i386/i386 [yamt-nfs-mp]: kvm86.c machdep.c vector.S src/sys/arch/i386/include [yamt-nfs-mp]: types.h src/sys/arch/i386/pnpbios [yamt-nfs-mp]: ess_pnpbios.c src/sys/arch/i386/stand/lib [yamt-nfs-mp]: pcio.c src/sys/arch/mips/atheros [yamt-nfs-mp]: ar5312_board.c ar5315.c ar5315_board.c src/sys/arch/mips/atheros/dev [yamt-nfs-mp]: if_ath_arbus.c src/sys/arch/mips/atheros/include [yamt-nfs-mp]: ar5312reg.h src/sys/arch/mips/include [yamt-nfs-mp]: pmap.h src/sys/arch/mips/mips [yamt-nfs-mp]: pmap.c src/sys/arch/mipsco/obio [yamt-nfs-mp]: rambo.h src/sys/arch/sandpoint/sandpoint [yamt-nfs-mp]: machdep.c src/sys/arch/sandpoint/stand/netboot [yamt-nfs-mp]: brdsetup.c globals.h main.c tlp.c src/sys/arch/sh3/sh3 [yamt-nfs-mp]: coff_exec.c src/sys/arch/sparc/conf [yamt-nfs-mp]: GENERIC KRUPS MRCOFFEE TADPOLE3GX src/sys/arch/sparc/dev [yamt-nfs-mp]: cgfourteen.c src/sys/arch/sparc64/sparc64 [yamt-nfs-mp]: machdep.c src/sys/arch/x86/include [yamt-nfs-mp]: pmap.h src/sys/arch/x86/pci [yamt-nfs-mp]: pci_machdep.c src/sys/arch/x86/x86 [yamt-nfs-mp]: ipmi.c pmap.c x86_machdep.c src/sys/arch/xen/x86 [yamt-nfs-mp]: x86_xpmap.c src/sys/coda [yamt-nfs-mp]: coda_vfsops.c coda_vnops.c src/sys/compat/common [yamt-nfs-mp]: compat_util.c vfs_syscalls_20.c src/sys/compat/darwin [yamt-nfs-mp]: darwin_mount.c src/sys/compat/ibcs2 [yamt-nfs-mp]: ibcs2_exec_coff.c ibcs2_stat.c src/sys/compat/irix [yamt-nfs-mp]: irix_fcntl.c src/sys/compat/linux/common [yamt-nfs-mp]: linux_sched.c linux_uselib.c src/sys/compat/ndis [yamt-nfs-mp]: subr_ndis.c src/sys/compat/netbsd32 [yamt-nfs-mp]: netbsd32_compat_20.c netbsd32_exec_elf32.c src/sys/compat/osf1 [yamt-nfs-mp]: osf1_mount.c src/sys/compat/sunos [yamt-nfs-mp]: sunos_misc.c src/sys/compat/sunos32 [yamt-nfs-mp]: sunos32_misc.c src/sys/compat/ultrix [yamt-nfs-mp]: ultrix_pathname.c src/sys/conf [yamt-nfs-mp]: files src/sys/crypto/blowfish [yamt-nfs-mp]: bf_locl.h src/sys/dev [yamt-nfs-mp]: fss.c verified_exec.c video.c vnd.c src/sys/dev/acpi [yamt-nfs-mp]: acpi_ec.c acpi_resource.c acpi_tz.c com_acpi.c files.acpi src/sys/dev/acpi/acpica [yamt-nfs-mp]: OsdMisc.c src/sys/dev/ata [yamt-nfs-mp]: satafis_subr.c satafisvar.h src/sys/dev/dkwedge [yamt-nfs-mp]: dk.c src/sys/dev/dm [yamt-nfs-mp]: device-mapper.c dm_table.c dm_target_snapshot.c files.dm src/sys/dev/i2c [yamt-nfs-mp]: sdtemp.c src/sys/dev/ic [yamt-nfs-mp]: ac97.c isp.c isp_library.c isp_library.h isp_netbsd.c isp_netbsd.h isp_stds.h isp_target.c isp_target.h isp_tpublic.h ispmbox.h ispreg.h ispvar.h mfi.c mfivar.h siisata.c siisatareg.h siisatavar.h src/sys/dev/ieee1394 [yamt-nfs-mp]: firewirereg.h src/sys/dev/microcode/isp [yamt-nfs-mp]: asm_2400.h src/sys/dev/mii [yamt-nfs-mp]: miidevs miidevs.h miidevs_data.h src/sys/dev/pci [yamt-nfs-mp]: files.pci if_bce.c if_jme.c if_wm.c if_wmreg.h isp_pci.c mfi_pci.c pci.c pci_usrreq.c pcidevs pcidevs.h pcidevs_data.h sdhc_pci.c siisata_pci.c src/sys/dev/pckbport [yamt-nfs-mp]: pckbd.c src/sys/dev/sbus [yamt-nfs-mp]: isp_sbus.c src/sys/dev/scsipi [yamt-nfs-mp]: sd.c src/sys/dev/sdmmc [yamt-nfs-mp]: files.sdmmc src/sys/dev/sysmon [yamt-nfs-mp]: sysmon_envsys.c sysmon_envsys_events.c src/sys/dev/usb [yamt-nfs-mp]: files.usb if_zyd.c ukbd.c usbdevs usbdevs.h usbdevs_data.h src/sys/external/bsd/drm/dist [yamt-nfs-mp]: Makefile.am README configure.ac src/sys/external/bsd/drm/dist/bsd-core [yamt-nfs-mp]: Makefile ati_pcigart.c drmP.h drm_agpsupport.c drm_atomic.h drm_auth.c drm_bufs.c drm_context.c drm_dma.c drm_drawable.c drm_drv.c drm_fops.c drm_ioctl.c drm_irq.c drm_linux_list.h drm_lock.c drm_memory.c drm_pci.c drm_pciids.h drm_scatter.c drm_sysctl.c drm_vm.c i915_drv.c mach64_drv.c mga_drv.c r128_drv.c radeon_drv.c savage_drv.c sis_drv.c tdfx_drv.c
CVS commit: src/regress/lib/libc/string/memchr
Module Name:src Committed By: dsl Date: Sat Jul 18 16:34:47 UTC 2009 Modified Files: src/regress/lib/libc/string/memchr: memchr_test.c Log Message: Start with alignment '1' and write the search char to the byte before the buffer. XXX needs tests searching for 0xff. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/regress/lib/libc/string/memchr/memchr_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/lib/libc/string/memchr/memchr_test.c diff -u src/regress/lib/libc/string/memchr/memchr_test.c:1.1 src/regress/lib/libc/string/memchr/memchr_test.c:1.2 --- src/regress/lib/libc/string/memchr/memchr_test.c:1.1 Tue Mar 15 15:57:58 2005 +++ src/regress/lib/libc/string/memchr/memchr_test.c Sat Jul 18 16:34:47 2009 @@ -110,8 +110,9 @@ { abc \xff\xff\xff\xff /, 8, 1, 7 }, }; -for (a = 0; a sizeof(long); ++a) { +for (a = 1; a 1 + sizeof(long); ++a) { for (t = 0; t (sizeof(tab) / sizeof(tab[0])); ++t) { + buf[a-1] = '/'; strcpy(buf[a], tab[t].val); off = f(buf[a], '/', tab[t].len);
CVS commit: src/common/lib/libc/arch/x86_64/string
Module Name:src Committed By: dsl Date: Sat Jul 18 16:40:31 UTC 2009 Modified Files: src/common/lib/libc/arch/x86_64/string: strchr.S Log Message: Shorten a dependency chain by using 'sbb, xor' (at a time when carry is set) instead of 'mov, neg, dec'. ('mov, not' can't be used because it doesn't set the flags.) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/x86_64/string/strchr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/x86_64/string/strchr.S diff -u src/common/lib/libc/arch/x86_64/string/strchr.S:1.3 src/common/lib/libc/arch/x86_64/string/strchr.S:1.4 --- src/common/lib/libc/arch/x86_64/string/strchr.S:1.3 Sat Jul 18 11:41:23 2009 +++ src/common/lib/libc/arch/x86_64/string/strchr.S Sat Jul 18 16:40:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: strchr.S,v 1.3 2009/07/18 11:41:23 dsl Exp $ */ +/* $NetBSD: strchr.S,v 1.4 2009/07/18 16:40:31 dsl Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: strchr.S,v 1.3 2009/07/18 11:41:23 dsl Exp $) + RCSID($NetBSD: strchr.S,v 1.4 2009/07/18 16:40:31 dsl Exp $) #endif /* @@ -56,6 +56,7 @@ movabsq $0x0101010101010101,%r8 movzbq %sil,%rdx /* value to search for (c) */ + /* These imul are 'directpath' on athlons, so are fast */ imul $0x80,%r8,%r9 /* 0x8080808080808080 */ imul %r8,%rdx /* (c) copied to all bytes */ test $7,%dil @@ -111,14 +112,13 @@ /* I (dsl) think a _ALIGN_TEXT here will slow things down! */ 20: xor %rcx,%rcx - mov %rdx,%rsi /* repeated char pattern (c) */ - sub %dil,%cl /* Convert low address values 1..7 */ - and $7,%cl /* to 7..1 */ + sub %dil,%cl /* Convert low address values 1..7 ... */ + sbb %rsi,%rsi /* carry was set, so %rsi now ~0u! */ + and $7,%cl /* ... to 7..1 */ and $~7,%dil /* move address to start of word */ shl $3,%cl /* now 56, 48 ... 16, 8 */ movq (%rdi),%rax /* aligned word containing first data */ - neg %rsi /* generate ~c (not doesn't set flags) */ - dec %rsi + xor %rdx,%rsi /* invert of search pattern (~c) */ je 22f /* searching for 0xff */ 21: shr %cl,%rsi /* ~c in low bytes */ or %rsi,%rax /* set some bits making low bytes invalid */
CVS commit: [netbsd-5-0] src/sys/netinet
Module Name:src Committed By: snj Date: Sat Jul 18 21:37:34 UTC 2009 Modified Files: src/sys/netinet [netbsd-5-0]: tcp_input.c Log Message: Pull up following revision(s) (requested by is in ticket #859): sys/netinet/tcp_input.c: revision 1.296 Follow exactly the recommendation of draft-ietf-tcpm-tcpsecure-11.txt: Don't check gainst the last ack received, but the expected sequence number. This makes RST handling independent of delayed ACK. From Joanne M Mikkelson. To generate a diff of this commit: cvs rdiff -u -r1.291 -r1.291.8.1 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.291 src/sys/netinet/tcp_input.c:1.291.8.1 --- src/sys/netinet/tcp_input.c:1.291 Mon Aug 4 04:08:47 2008 +++ src/sys/netinet/tcp_input.c Sat Jul 18 21:37:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.291 2008/08/04 04:08:47 tls Exp $ */ +/* $NetBSD: tcp_input.c,v 1.291.8.1 2009/07/18 21:37:34 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -145,7 +145,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291 2008/08/04 04:08:47 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.8.1 2009/07/18 21:37:34 snj Exp $); #include opt_inet.h #include opt_ipsec.h @@ -2097,7 +2097,7 @@ tcps[TCP_STAT_RCVDUPBYTE] += todrop; TCP_STAT_PUTREF(); } else if ((tiflags TH_RST) - th-th_seq != tp-last_ack_sent) { + th-th_seq != tp-rcv_nxt) { /* * Test for reset before adjusting the sequence * number for overlapping data. @@ -2223,7 +2223,7 @@ * Close the tcb. */ if (tiflags TH_RST) { - if (th-th_seq != tp-last_ack_sent) + if (th-th_seq != tp-rcv_nxt) goto dropafterack_ratelim; switch (tp-t_state) {
CVS commit: [netbsd-5] src/sys/netinet
Module Name:src Committed By: snj Date: Sat Jul 18 21:38:09 UTC 2009 Modified Files: src/sys/netinet [netbsd-5]: tcp_input.c Log Message: Pull up following revision(s) (requested by is in ticket #859): sys/netinet/tcp_input.c: revision 1.296 Follow exactly the recommendation of draft-ietf-tcpm-tcpsecure-11.txt: Don't check gainst the last ack received, but the expected sequence number. This makes RST handling independent of delayed ACK. From Joanne M Mikkelson. To generate a diff of this commit: cvs rdiff -u -r1.291 -r1.291.4.1 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.291 src/sys/netinet/tcp_input.c:1.291.4.1 --- src/sys/netinet/tcp_input.c:1.291 Mon Aug 4 04:08:47 2008 +++ src/sys/netinet/tcp_input.c Sat Jul 18 21:38:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.291 2008/08/04 04:08:47 tls Exp $ */ +/* $NetBSD: tcp_input.c,v 1.291.4.1 2009/07/18 21:38:09 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -145,7 +145,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291 2008/08/04 04:08:47 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.1 2009/07/18 21:38:09 snj Exp $); #include opt_inet.h #include opt_ipsec.h @@ -2097,7 +2097,7 @@ tcps[TCP_STAT_RCVDUPBYTE] += todrop; TCP_STAT_PUTREF(); } else if ((tiflags TH_RST) - th-th_seq != tp-last_ack_sent) { + th-th_seq != tp-rcv_nxt) { /* * Test for reset before adjusting the sequence * number for overlapping data. @@ -2223,7 +2223,7 @@ * Close the tcb. */ if (tiflags TH_RST) { - if (th-th_seq != tp-last_ack_sent) + if (th-th_seq != tp-rcv_nxt) goto dropafterack_ratelim; switch (tp-t_state) {
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Sat Jul 18 21:39:10 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 859. To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.48 src/doc/CHANGES-5.1:1.1.2.49 --- src/doc/CHANGES-5.1:1.1.2.48 Fri Jul 17 05:52:49 2009 +++ src/doc/CHANGES-5.1 Sat Jul 18 21:39:10 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.48 2009/07/17 05:52:49 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.49 2009/07/18 21:39:10 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -1579,3 +1579,11 @@ ethernet definitions are mixed. Fixes a refcount assertion. [tonnerre, ticket #860] +sys/netinet/tcp_input.c1.296 + + Follow exactly the recommendation of + draft-ietf-tcpm-tcpsecure-11.txt: Don't check gainst the last + ack received, but the expected sequence number. This makes RST + handling independent of delayed ACK. + [is, ticket #859] +
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Sat Jul 18 21:39:47 UTC 2009 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.1 Log Message: Ticket 859. To generate a diff of this commit: cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/doc/CHANGES-5.0.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0.1 diff -u src/doc/CHANGES-5.0.1:1.1.2.36 src/doc/CHANGES-5.0.1:1.1.2.37 --- src/doc/CHANGES-5.0.1:1.1.2.36 Fri Jul 17 05:51:33 2009 +++ src/doc/CHANGES-5.0.1 Sat Jul 18 21:39:47 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.1,v 1.1.2.36 2009/07/17 05:51:33 snj Exp $ +# $NetBSD: CHANGES-5.0.1,v 1.1.2.37 2009/07/18 21:39:47 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.0.1 release: @@ -618,3 +618,11 @@ ethernet definitions are mixed. Fixes a refcount assertion. [tonnerre, ticket #860] +sys/netinet/tcp_input.c1.296 + + Follow exactly the recommendation of + draft-ietf-tcpm-tcpsecure-11.txt: Don't check gainst the last + ack received, but the expected sequence number. This makes RST + handling independent of delayed ACK. + [is, ticket #859] +
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: reinoud Date: Sat Jul 18 22:15:12 UTC 2009 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Fix ./usr/lib/librumpfs_nilfs_p.a's line in lists/comp/mi To generate a diff of this commit: cvs rdiff -u -r1.1280 -r1.1281 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1280 src/distrib/sets/lists/comp/mi:1.1281 --- src/distrib/sets/lists/comp/mi:1.1280 Sat Jul 18 21:32:52 2009 +++ src/distrib/sets/lists/comp/mi Sat Jul 18 22:15:12 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1280 2009/07/18 21:32:52 reinoud Exp $ +# $NetBSD: mi,v 1.1281 2009/07/18 22:15:12 reinoud Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2542,7 +2542,7 @@ ./usr/lib/librumpfs_nfs_p.a comp-c-proflib profile ./usr/lib/librumpfs_nilfs.a comp-c-lib ./usr/lib/librumpfs_nilfs_g.a -unknown- debuglib -./usr/lib/librumpfs_nilfs_p.a -unknown- debuglib +./usr/lib/librumpfs_nilfs_p.a comp-c-proflib debuglib ./usr/lib/librumpfs_ntfs.a comp-c-lib ./usr/lib/librumpfs_ntfs_g.a -unknown- debuglib ./usr/lib/librumpfs_ntfs_p.a comp-c-proflib profile
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: reinoud Date: Sat Jul 18 22:19:40 UTC 2009 Modified Files: src/distrib/sets/lists/comp: mi Log Message: *Sigh* its late... fix entry for lists/comp/mi To generate a diff of this commit: cvs rdiff -u -r1.1281 -r1.1282 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1281 src/distrib/sets/lists/comp/mi:1.1282 --- src/distrib/sets/lists/comp/mi:1.1281 Sat Jul 18 22:15:12 2009 +++ src/distrib/sets/lists/comp/mi Sat Jul 18 22:19:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1281 2009/07/18 22:15:12 reinoud Exp $ +# $NetBSD: mi,v 1.1282 2009/07/18 22:19:40 reinoud Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2542,7 +2542,7 @@ ./usr/lib/librumpfs_nfs_p.a comp-c-proflib profile ./usr/lib/librumpfs_nilfs.a comp-c-lib ./usr/lib/librumpfs_nilfs_g.a -unknown- debuglib -./usr/lib/librumpfs_nilfs_p.a comp-c-proflib debuglib +./usr/lib/librumpfs_nilfs_p.a comp-c-proflib profile ./usr/lib/librumpfs_ntfs.a comp-c-lib ./usr/lib/librumpfs_ntfs_g.a -unknown- debuglib ./usr/lib/librumpfs_ntfs_p.a comp-c-proflib profile
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: reinoud Date: Sat Jul 18 22:24:02 UTC 2009 Modified Files: src/distrib/sets/lists/base: mi Log Message: Fix missing /usr/include/nilfs directory declaration To generate a diff of this commit: cvs rdiff -u -r1.822 -r1.823 src/distrib/sets/lists/base/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.822 src/distrib/sets/lists/base/mi:1.823 --- src/distrib/sets/lists/base/mi:1.822 Sat Jul 18 21:32:52 2009 +++ src/distrib/sets/lists/base/mi Sat Jul 18 22:24:02 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.822 2009/07/18 21:32:52 reinoud Exp $ +# $NetBSD: mi,v 1.823 2009/07/18 22:24:02 reinoud Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -1076,6 +1076,7 @@ ./usr/include/fs/efsbase-c-usr ./usr/include/fs/hfsbase-c-usr ./usr/include/fs/hfspbase-obsolete obsolete +./usr/include/fs/nilfsbase-c-usr ./usr/include/fs/puffsbase-puffs-usr ./usr/include/fs/smbfsbase-c-usr ./usr/include/fs/sysvbfs base-c-usr
CVS commit: src/sys/netinet
Module Name:src Committed By: minskim Date: Sat Jul 18 23:09:53 UTC 2009 Modified Files: src/sys/netinet: tcp_input.c Log Message: Check the minimum ttl only when pcb is available. To generate a diff of this commit: cvs rdiff -u -r1.297 -r1.298 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.297 src/sys/netinet/tcp_input.c:1.298 --- src/sys/netinet/tcp_input.c:1.297 Fri Jul 17 22:02:54 2009 +++ src/sys/netinet/tcp_input.c Sat Jul 18 23:09:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.297 2009/07/17 22:02:54 minskim Exp $ */ +/* $NetBSD: tcp_input.c,v 1.298 2009/07/18 23:09:53 minskim Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -145,7 +145,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.297 2009/07/17 22:02:54 minskim Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.298 2009/07/18 23:09:53 minskim Exp $); #include opt_inet.h #include opt_ipsec.h @@ -1289,10 +1289,6 @@ #endif } - /* Check the minimum TTL for socket. */ - if (ip-ip_ttl inp-inp_ip_minttl) - goto drop; - /* * If the state is CLOSED (i.e., TCB does not exist) then * all data in the incoming segment is discarded. @@ -1302,6 +1298,10 @@ tp = NULL; so = NULL; if (inp) { + /* Check the minimum TTL for socket. */ + if (ip-ip_ttl inp-inp_ip_minttl) + goto drop; + tp = intotcpcb(inp); so = inp-inp_socket; }
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sun Jul 19 02:26:49 UTC 2009 Modified Files: src/sys/kern: sys_mqueue.c src/sys/sys: mqueue.h Log Message: Fix previous, so that it actually works, correctly. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/kern/sys_mqueue.c cvs rdiff -u -r1.8 -r1.9 src/sys/sys/mqueue.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_mqueue.c diff -u src/sys/kern/sys_mqueue.c:1.22 src/sys/kern/sys_mqueue.c:1.23 --- src/sys/kern/sys_mqueue.c:1.22 Mon Jul 13 02:37:12 2009 +++ src/sys/kern/sys_mqueue.c Sun Jul 19 02:26:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_mqueue.c,v 1.22 2009/07/13 02:37:12 rmind Exp $ */ +/* $NetBSD: sys_mqueue.c,v 1.23 2009/07/19 02:26:49 rmind Exp $ */ /* * Copyright (c) 2007-2009 Mindaugas Rasiukevicius rmind at NetBSD org @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_mqueue.c,v 1.22 2009/07/13 02:37:12 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_mqueue.c,v 1.23 2009/07/19 02:26:49 rmind Exp $); #include sys/param.h #include sys/types.h @@ -136,7 +136,8 @@ size_t msz; u_int i; - for (i = 0; i (MQ_PQSIZE + 1); i++) { + /* Note MQ_PQSIZE + 1. */ + for (i = 0; i = MQ_PQSIZE; i++) { while ((msg = TAILQ_FIRST(mq-mq_head[i])) != NULL) { TAILQ_REMOVE(mq-mq_head[i], msg, msg_queue); msz = sizeof(struct mq_msg) + msg-msg_len; @@ -199,20 +200,20 @@ /* * mqueue_linear_insert: perform linear insert according to the message - * priority into the reserved queue (note MQ_PQSIZE + 1). Reserved queue - * is a sorted list used only when mq_prio_max is increased via sysctl. + * priority into the reserved queue (MQ_PQRESQ). Reserved queue is a + * sorted list used only when mq_prio_max is increased via sysctl. */ static inline void mqueue_linear_insert(struct mqueue *mq, struct mq_msg *msg) { struct mq_msg *mit; - TAILQ_FOREACH(mit, mq-mq_head[MQ_PQSIZE], msg_queue) { + TAILQ_FOREACH(mit, mq-mq_head[MQ_PQRESQ], msg_queue) { if (msg-msg_prio mit-msg_prio) break; } if (mit == NULL) { - TAILQ_INSERT_TAIL(mq-mq_head[MQ_PQSIZE], msg, msg_queue); + TAILQ_INSERT_TAIL(mq-mq_head[MQ_PQRESQ], msg, msg_queue); } else { TAILQ_INSERT_BEFORE(mit, msg, msg_queue); } @@ -543,7 +544,7 @@ struct mqueue *mq; struct mq_msg *msg = NULL; struct mq_attr *mqattr; - u_int prio; + u_int idx; int error; /* Get the message queue */ @@ -588,22 +589,24 @@ } } - /* Find the highest priority message */ - prio = ffs(mq-mq_bitmap); - if (__predict_false(prio == 0)) { - /* Must be in reserved queue then */ - prio = MQ_PQSIZE; - } - - /* Remove it from the queue */ - msg = TAILQ_FIRST(mq-mq_head[prio]); - KASSERT(msg != NULL); - TAILQ_REMOVE(mq-mq_head[prio], msg, msg_queue); - - /* Unmark the bit, if last message */ - if (__predict_true(prio != MQ_PQSIZE) - TAILQ_EMPTY(mq-mq_head[prio])) { - mq-mq_bitmap = ~(MQ_PQMSB prio); + /* + * Find the highest priority message, and remove it from the queue. + * At first, reserved queue is checked, bitmap is next. + */ + msg = TAILQ_FIRST(mq-mq_head[MQ_PQRESQ]); + if (__predict_true(msg == NULL)) { + idx = ffs(mq-mq_bitmap); + msg = TAILQ_FIRST(mq-mq_head[idx]); + KASSERT(msg != NULL); + } else { + idx = MQ_PQRESQ; + } + TAILQ_REMOVE(mq-mq_head[idx], msg, msg_queue); + + /* Unmark the bit, if last message. */ + if (__predict_true(idx) TAILQ_EMPTY(mq-mq_head[idx])) { + KASSERT((MQ_PQSIZE - idx) == msg-msg_prio); + mq-mq_bitmap = ~(1 --idx); } /* Decrement the counter and signal waiter, if any */ @@ -767,10 +770,16 @@ } KASSERT(mqattr-mq_curmsgs mqattr-mq_maxmsg); - /* Insert message into the queue, according to the priority */ + /* + * Insert message into the queue, according to the priority. + * Note the difference between index and priority. + */ if (__predict_true(msg_prio MQ_PQSIZE)) { - TAILQ_INSERT_TAIL(mq-mq_head[msg_prio], msg, msg_queue); - mq-mq_bitmap |= (MQ_PQMSB msg_prio); + u_int idx = MQ_PQSIZE - msg_prio; + + KASSERT(idx != MQ_PQRESQ); + TAILQ_INSERT_TAIL(mq-mq_head[idx], msg, msg_queue); + mq-mq_bitmap |= (1 --idx); } else { mqueue_linear_insert(mq, msg); } Index: src/sys/sys/mqueue.h diff -u src/sys/sys/mqueue.h:1.8 src/sys/sys/mqueue.h:1.9 --- src/sys/sys/mqueue.h:1.8 Mon Jul 13 02:37:13 2009 +++ src/sys/sys/mqueue.h Sun Jul 19 02:26:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mqueue.h,v 1.8 2009/07/13 02:37:13 rmind Exp $ */ +/* $NetBSD: mqueue.h,v 1.9 2009/07/19 02:26:49 rmind Exp $ */ /* * Copyright (c) 2007-2009 Mindaugas Rasiukevicius rmind at NetBSD org @@ -67,9 +67,9 @@ /* Default size of the message */ #define MQ_DEF_MSGSIZE 1024 -/* Size/bits and MSB for the queue array */ +/* Size/bits and index of reserved queue */ #define MQ_PQSIZE 32 -#define MQ_PQMSB 0x8000U +#define MQ_PQRESQ 0 /* Structure of the
CVS commit: src/regress/sys/kern/mqueue
Module Name:src Committed By: rmind Date: Sun Jul 19 02:31:20 UTC 2009 Modified Files: src/regress/sys/kern/mqueue: Makefile mq_prio_test.c Log Message: Improve mqueue regression test. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/regress/sys/kern/mqueue/Makefile \ src/regress/sys/kern/mqueue/mq_prio_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/kern/mqueue/Makefile diff -u src/regress/sys/kern/mqueue/Makefile:1.1 src/regress/sys/kern/mqueue/Makefile:1.2 --- src/regress/sys/kern/mqueue/Makefile:1.1 Mon Jul 13 02:55:42 2009 +++ src/regress/sys/kern/mqueue/Makefile Sun Jul 19 02:31:19 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/07/13 02:55:42 rmind Exp $ +# $NetBSD: Makefile,v 1.2 2009/07/19 02:31:19 rmind Exp $ # PROG= mq_prio_test NOMAN= # defined @@ -6,7 +6,7 @@ LDADD= -lrt regress: - @/sbin/sysctl kern.mqueue.mq_prio_max=33 + @/sbin/sysctl -w kern.mqueue.mq_prio_max=33 @if ./$(PROG); then \ echo PASSED; \ else \ Index: src/regress/sys/kern/mqueue/mq_prio_test.c diff -u src/regress/sys/kern/mqueue/mq_prio_test.c:1.1 src/regress/sys/kern/mqueue/mq_prio_test.c:1.2 --- src/regress/sys/kern/mqueue/mq_prio_test.c:1.1 Mon Jul 13 02:55:42 2009 +++ src/regress/sys/kern/mqueue/mq_prio_test.c Sun Jul 19 02:31:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mq_prio_test.c,v 1.1 2009/07/13 02:55:42 rmind Exp $ */ +/* $NetBSD: mq_prio_test.c,v 1.2 2009/07/19 02:31:19 rmind Exp $ */ /* * Test for POSIX message queue priority handling. @@ -28,7 +28,7 @@ err(EXIT_FAILURE, mq_send 1); msg[0] = 'b'; - if (mq_send(mqfd, msg, sizeof(msg), 1 + MQ_PRIO_BOUNDARY) == -1) + if (mq_send(mqfd, msg, sizeof(msg), MQ_PRIO_BOUNDARY + 1) == -1) err(EXIT_FAILURE, mq_send 2); msg[0] = 'c'; @@ -36,8 +36,16 @@ err(EXIT_FAILURE, mq_send 3); msg[0] = 'd'; - if (mq_send(mqfd, msg, sizeof(msg), 1 + MQ_PRIO_BOUNDARY) == -1) + if (mq_send(mqfd, msg, sizeof(msg), MQ_PRIO_BOUNDARY - 1) == -1) err(EXIT_FAILURE, mq_send 4); + + msg[0] = 'e'; + if (mq_send(mqfd, msg, sizeof(msg), 0) == -1) + err(EXIT_FAILURE, mq_send 5); + + msg[0] = 'f'; + if (mq_send(mqfd, msg, sizeof(msg), MQ_PRIO_BOUNDARY + 1) == -1) + err(EXIT_FAILURE, mq_send 6); } static void @@ -60,22 +68,32 @@ if (mq_receive(mqfd, m, len, p) == -1) { err(EXIT_FAILURE, mq_receive 1); } - assert(p == 32 m[0] == 'b'); + assert(p == (MQ_PRIO_BOUNDARY + 1) m[0] == 'b'); if (mq_receive(mqfd, m, len, p) == -1) { err(EXIT_FAILURE, mq_receive 2); } - assert(p == 32 m[0] == 'd'); + assert(p == (MQ_PRIO_BOUNDARY + 1) m[0] == 'f'); if (mq_receive(mqfd, m, len, p) == -1) { err(EXIT_FAILURE, mq_receive 3); } - assert(p == 31 m[0] == 'a'); + assert(p == MQ_PRIO_BOUNDARY m[0] == 'a'); if (mq_receive(mqfd, m, len, p) == -1) { err(EXIT_FAILURE, mq_receive 4); } - assert(p == 31 m[0] == 'c'); + assert(p == MQ_PRIO_BOUNDARY m[0] == 'c'); + + if (mq_receive(mqfd, m, len, p) == -1) { + err(EXIT_FAILURE, mq_receive 5); + } + assert(p == (MQ_PRIO_BOUNDARY - 1) m[0] == 'd'); + + if (mq_receive(mqfd, m, len, p) == -1) { + err(EXIT_FAILURE, mq_receive 6); + } + assert(p == 0 m[0] == 'e'); free(m); }
CVS commit: src/sys/ddb
Module Name:src Committed By: rmind Date: Sun Jul 19 02:37:33 UTC 2009 Modified Files: src/sys/ddb: db_command.c db_xxx.c Log Message: Add #ifdef MQUEUE for db_show_mqueue_cmd(). XXX: Wrong. DDB should be dynamic, modular, etc. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/sys/ddb/db_command.c cvs rdiff -u -r1.61 -r1.62 src/sys/ddb/db_xxx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ddb/db_command.c diff -u src/sys/ddb/db_command.c:1.132 src/sys/ddb/db_command.c:1.133 --- src/sys/ddb/db_command.c:1.132 Fri Jun 5 04:31:47 2009 +++ src/sys/ddb/db_command.c Sun Jul 19 02:37:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.c,v 1.132 2009/06/05 04:31:47 mrg Exp $ */ +/* $NetBSD: db_command.c,v 1.133 2009/07/19 02:37:33 rmind Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc. @@ -60,12 +60,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: db_command.c,v 1.132 2009/06/05 04:31:47 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: db_command.c,v 1.133 2009/07/19 02:37:33 rmind Exp $); #ifdef _KERNEL_OPT #include opt_aio.h #include opt_ddb.h #include opt_kgdb.h +#include opt_mqueue.h #include opt_inet.h #include opt_uvmhist.h #include opt_ddbparam.h @@ -250,8 +251,10 @@ Print kernel modules, NULL, NULL) }, { DDB_ADD_CMD(mount, db_mount_print_cmd, 0, Print the mount structure at address., [/f] address,NULL) }, +#ifdef MQUEUE { DDB_ADD_CMD(mqueue, db_show_mqueue_cmd, 0, Print the message queues, NULL, NULL) }, +#endif { DDB_ADD_CMD(mbuf, db_mbuf_print_cmd, 0,NULL,NULL, -c prints all mbuf chains) }, { DDB_ADD_CMD(ncache, db_namecache_print_cmd, 0, Index: src/sys/ddb/db_xxx.c diff -u src/sys/ddb/db_xxx.c:1.61 src/sys/ddb/db_xxx.c:1.62 --- src/sys/ddb/db_xxx.c:1.61 Sun May 24 21:41:25 2009 +++ src/sys/ddb/db_xxx.c Sun Jul 19 02:37:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: db_xxx.c,v 1.61 2009/05/24 21:41:25 ad Exp $ */ +/* $NetBSD: db_xxx.c,v 1.62 2009/07/19 02:37:33 rmind Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -37,11 +37,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: db_xxx.c,v 1.61 2009/05/24 21:41:25 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: db_xxx.c,v 1.62 2009/07/19 02:37:33 rmind Exp $); #ifdef _KERNEL_OPT #include opt_kgdb.h #include opt_aio.h +#include opt_mqueue.h #endif #ifndef _KERNEL @@ -149,6 +150,7 @@ } #endif +#ifdef MQUEUE void db_show_mqueue_cmd(db_expr_t addr, bool haddr, db_expr_t count, const char *modif) @@ -158,6 +160,7 @@ mqueue_print_list(db_printf); #endif } +#endif void db_show_module_cmd(db_expr_t addr, bool haddr,
CVS commit: src/sys/compat/common
Module Name:src Committed By: rmind Date: Sun Jul 19 02:41:27 UTC 2009 Modified Files: src/sys/compat/common: compat_mod.c kern_time_50.c Log Message: - Use #ifdef AIO, instead of #ifdef notyet. Not a solution, but at least gets it working for MONOLITHIC kernel. - Similarily add #ifdef MQUEUE for mqueue compat. - Amend TNF license to be 2-clause. Approved by christos. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/compat/common/compat_mod.c \ src/sys/compat/common/kern_time_50.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_mod.c diff -u src/sys/compat/common/compat_mod.c:1.7 src/sys/compat/common/compat_mod.c:1.8 --- src/sys/compat/common/compat_mod.c:1.7 Tue Jan 13 20:47:47 2009 +++ src/sys/compat/common/compat_mod.c Sun Jul 19 02:41:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.c,v 1.7 2009/01/13 20:47:47 martin Exp $ */ +/* $NetBSD: compat_mod.c,v 1.8 2009/07/19 02:41:27 rmind Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.7 2009/01/13 20:47:47 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.8 2009/07/19 02:41:27 rmind Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -231,6 +231,8 @@ # endif { SYS_compat_50___fhstat40, 0, (sy_call_t *)compat_50_sys___fhstat40 }, { SYS_compat_50_aio_suspend, 0, (sy_call_t *)compat_50_sys_aio_suspend }, + { SYS_compat_50_mq_timedreceive, 0, (sy_call_t *)compat_50_sys_mq_timedreceive }, + { SYS_compat_50_mq_timedsend, 0, (sy_call_t *)compat_50_sys_mq_timedsend }, #endif { 0, 0, NULL }, }; Index: src/sys/compat/common/kern_time_50.c diff -u src/sys/compat/common/kern_time_50.c:1.7 src/sys/compat/common/kern_time_50.c:1.8 --- src/sys/compat/common/kern_time_50.c:1.7 Sun Mar 29 19:21:19 2009 +++ src/sys/compat/common/kern_time_50.c Sun Jul 19 02:41:27 2009 @@ -1,7 +1,7 @@ -/* $NetBSD: kern_time_50.c,v 1.7 2009/03/29 19:21:19 christos Exp $ */ +/* $NetBSD: kern_time_50.c,v 1.8 2009/07/19 02:41:27 rmind Exp $ */ /*- - * Copyright (c) 2008 The NetBSD Foundation, Inc. + * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - *This product includes software developed by the NetBSD - *Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - *contributors may be used to endorse or promote products derived - *from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -36,10 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.7 2009/03/29 19:21:19 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.8 2009/07/19 02:41:27 rmind Exp $); #ifdef _KERNEL_OPT +#include opt_aio.h #include opt_ntp.h +#include opt_mqueue.h #endif #include sys/param.h @@ -373,7 +368,7 @@ syscallarg(int) nent; syscallarg(const struct timespec50 *) timeout; } */ -#ifdef notyet +#ifdef AIO struct aiocb **list; struct timespec ts; struct timespec50 ts50; @@ -542,6 +537,7 @@ syscallarg(unsigned) msg_prio; syscallarg(const struct timespec50 *) abs_timeout; } */ +#ifdef MQUEUE int t; int error; struct timespec50 ts50; @@ -561,6 +557,9 @@ return mq_send1(l, SCARG(uap, mqdes), SCARG(uap, msg_ptr), SCARG(uap, msg_len), SCARG(uap, msg_prio), t); +#else + return ENOSYS; +#endif } int @@ -574,6 +573,7 @@ syscallarg(unsigned *) msg_prio; syscallarg(const struct timespec50 *) abs_timeout; } */ +#ifdef MQUEUE int error, t; ssize_t mlen; struct timespec ts; @@ -598,6 +598,9 @@ *retval = mlen; return error; +#else + return ENOSYS; +#endif } static int
CVS commit: src
Module Name:src Committed By: rmind Date: Sun Jul 19 02:50:45 UTC 2009 Modified Files: src/distrib/sets/lists/base: module.mi src/sys/arch/i386/conf: GENERIC MONOLITHIC src/sys/kern: init_main.c kern_stub.c sys_mqueue.c syscalls.master src/sys/modules: Makefile src/sys/sys: mqueue.h Added Files: src/sys/modules/mqueue: Makefile Log Message: Make POSIX message queues a kernel module. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/base/module.mi cvs rdiff -u -r1.935 -r1.936 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/conf/MONOLITHIC cvs rdiff -u -r1.392 -r1.393 src/sys/kern/init_main.c cvs rdiff -u -r1.18 -r1.19 src/sys/kern/kern_stub.c cvs rdiff -u -r1.23 -r1.24 src/sys/kern/sys_mqueue.c cvs rdiff -u -r1.227 -r1.228 src/sys/kern/syscalls.master cvs rdiff -u -r1.30 -r1.31 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/mqueue/Makefile cvs rdiff -u -r1.9 -r1.10 src/sys/sys/mqueue.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/module.mi diff -u src/distrib/sets/lists/base/module.mi:1.9 src/distrib/sets/lists/base/module.mi:1.10 --- src/distrib/sets/lists/base/module.mi:1.9 Sat Jul 18 21:32:52 2009 +++ src/distrib/sets/lists/base/module.mi Sun Jul 19 02:50:44 2009 @@ -1,4 +1,4 @@ -# $NetBSD: module.mi,v 1.9 2009/07/18 21:32:52 reinoud Exp $ +# $NetBSD: module.mi,v 1.10 2009/07/19 02:50:44 rmind Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -57,6 +57,8 @@ ./@MODULEDIR@/mfs/mfs.kmod base-kernel-modules ./@MODULEDIR@/minirootbase-kernel-modules ./@MODULEDIR@/miniroot/miniroot.kmod base-kernel-modules +./@MODULEDIR@/mqueuebase-kernel-modules +./@MODULEDIR@/mqueue/mqueue.kmod base-kernel-modules ./@MODULEDIR@/msdosbase-kernel-modules ./@MODULEDIR@/msdos/msdos.kmod base-kernel-modules ./@MODULEDIR@/nfsbase-kernel-modules Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.935 src/sys/arch/i386/conf/GENERIC:1.936 --- src/sys/arch/i386/conf/GENERIC:1.935 Sat Jul 18 16:31:42 2009 +++ src/sys/arch/i386/conf/GENERIC Sun Jul 19 02:50:44 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.935 2009/07/18 16:31:42 reinoud Exp $ +# $NetBSD: GENERIC,v 1.936 2009/07/19 02:50:44 rmind Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.935 $ +#ident GENERIC-$Revision: 1.936 $ maxusers 64 # estimated number of users @@ -97,7 +97,8 @@ options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing #options P1003_1B_SEMAPHORE # p1003.1b semaphore support -no options AIO # POSIX AIO, built as a module +no options AIO # POSIX asynchronous I/O, built as a module +no options MQUEUE # POSIX messsage queues, built as a module options MODULAR # new style module framework Index: src/sys/arch/i386/conf/MONOLITHIC diff -u src/sys/arch/i386/conf/MONOLITHIC:1.7 src/sys/arch/i386/conf/MONOLITHIC:1.8 --- src/sys/arch/i386/conf/MONOLITHIC:1.7 Sun Mar 29 17:06:01 2009 +++ src/sys/arch/i386/conf/MONOLITHIC Sun Jul 19 02:50:44 2009 @@ -11,7 +11,8 @@ options COREDUMP options P1003_1B_SEMAPHORE # p1003.1b semaphore support -options AIO # POSIX AIO, built as a module +options AIO # POSIX asynchronous I/O, built as a module +options MQUEUE # POSIX messsage queues, built as a module options COMPAT_OSSAUDIO # OSS (Voxware) audio driver compatibility options COMPAT_SVR4 # binary compatibility with SVR4 Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.392 src/sys/kern/init_main.c:1.393 --- src/sys/kern/init_main.c:1.392 Fri Jul 17 23:31:51 2009 +++ src/sys/kern/init_main.c Sun Jul 19 02:50:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.392 2009/07/17 23:31:51 ad Exp $ */ +/* $NetBSD: init_main.c,v 1.393 2009/07/19 02:50:44 rmind Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.392 2009/07/17 23:31:51 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.393 2009/07/19 02:50:44 rmind Exp $); #include opt_ddb.h #include opt_ipsec.h @@ -159,7 +159,6 @@ #include sys/uuid.h #include sys/extent.h #include sys/disk.h -#include sys/mqueue.h #include sys/msgbuf.h #include sys/module.h #include sys/event.h @@ -430,9 +429,6 @@ /* Initialize kqueue. */ kqueue_init(); - /* Initialize message queues. */ - mqueue_sysinit(); - /* Initialize the system monitor subsystems. */ #if NSYSMON_TASKQ 0 sysmon_task_queue_preinit(); Index: src/sys/kern/kern_stub.c diff -u src/sys/kern/kern_stub.c:1.18 src/sys/kern/kern_stub.c:1.19 --- src/sys/kern/kern_stub.c:1.18 Fri Feb 13 22:41:04
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sun Jul 19 02:54:22 UTC 2009 Modified Files: src/sys/kern: init_sysent.c syscalls.c src/sys/sys: syscall.h syscallargs.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.239 -r1.240 src/sys/kern/init_sysent.c cvs rdiff -u -r1.230 -r1.231 src/sys/kern/syscalls.c cvs rdiff -u -r1.227 -r1.228 src/sys/sys/syscall.h cvs rdiff -u -r1.209 -r1.210 src/sys/sys/syscallargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_sysent.c diff -u src/sys/kern/init_sysent.c:1.239 src/sys/kern/init_sysent.c:1.240 --- src/sys/kern/init_sysent.c:1.239 Fri May 15 15:52:39 2009 +++ src/sys/kern/init_sysent.c Sun Jul 19 02:54:21 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: init_sysent.c,v 1.239 2009/05/15 15:52:39 pooka Exp $ */ +/* $NetBSD: init_sysent.c,v 1.240 2009/07/19 02:54:21 rmind Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.227 2009/05/15 15:51:27 pooka Exp + * created from NetBSD: syscalls.master,v 1.228 2009/07/19 02:50:44 rmind Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.239 2009/05/15 15:52:39 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.240 2009/07/19 02:54:21 rmind Exp $); #include opt_modular.h #include opt_ntp.h @@ -683,21 +683,21 @@ { 0, 0, 0, sys_nosys }, /* 256 = unimplemented sys__ksem_timedwait */ { ns(struct sys_mq_open_args), 0, - (sy_call_t *)sys_mq_open }, /* 257 = mq_open */ + (sy_call_t *)sys_nomodule }, /* 257 = mq_open */ { ns(struct sys_mq_close_args), 0, - (sy_call_t *)sys_mq_close }, /* 258 = mq_close */ + (sy_call_t *)sys_nomodule }, /* 258 = mq_close */ { ns(struct sys_mq_unlink_args), 0, - (sy_call_t *)sys_mq_unlink }, /* 259 = mq_unlink */ + (sy_call_t *)sys_nomodule }, /* 259 = mq_unlink */ { ns(struct sys_mq_getattr_args), 0, - (sy_call_t *)sys_mq_getattr }, /* 260 = mq_getattr */ + (sy_call_t *)sys_nomodule }, /* 260 = mq_getattr */ { ns(struct sys_mq_setattr_args), 0, - (sy_call_t *)sys_mq_setattr }, /* 261 = mq_setattr */ + (sy_call_t *)sys_nomodule }, /* 261 = mq_setattr */ { ns(struct sys_mq_notify_args), 0, - (sy_call_t *)sys_mq_notify }, /* 262 = mq_notify */ + (sy_call_t *)sys_nomodule }, /* 262 = mq_notify */ { ns(struct sys_mq_send_args), 0, - (sy_call_t *)sys_mq_send }, /* 263 = mq_send */ + (sy_call_t *)sys_nomodule }, /* 263 = mq_send */ { ns(struct sys_mq_receive_args), 0, - (sy_call_t *)sys_mq_receive }, /* 264 = mq_receive */ + (sy_call_t *)sys_nomodule }, /* 264 = mq_receive */ { ns(struct compat_50_sys_mq_timedsend_args), 0, (sy_call_t *)sys_nomodule }, /* 265 = compat_50_mq_timedsend */ { ns(struct compat_50_sys_mq_timedreceive_args), 0, @@ -1053,9 +1053,9 @@ { ns(struct sys_sigtimedwait50_args), 0, (sy_call_t *)sys_sigtimedwait50 },/* 431 = sigtimedwait50 */ { ns(struct sys___mq_timedsend50_args), 0, - (sy_call_t *)sys___mq_timedsend50 },/* 432 = __mq_timedsend50 */ + (sy_call_t *)sys_nomodule }, /* 432 = __mq_timedsend50 */ { ns(struct sys___mq_timedreceive50_args), 0, - (sy_call_t *)sys___mq_timedreceive50 },/* 433 = __mq_timedreceive50 */ + (sy_call_t *)sys_nomodule }, /* 433 = __mq_timedreceive50 */ { ns(struct syslwp_park50_args), 0, (sy_call_t *)syslwp_park50 }, /* 434 = ___lwp_park50 */ { ns(struct sys___kevent50_args), 0, Index: src/sys/kern/syscalls.c diff -u src/sys/kern/syscalls.c:1.230 src/sys/kern/syscalls.c:1.231 --- src/sys/kern/syscalls.c:1.230 Fri May 15 15:52:39 2009 +++ src/sys/kern/syscalls.c Sun Jul 19 02:54:21 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: syscalls.c,v 1.230 2009/05/15 15:52:39 pooka Exp $ */ +/* $NetBSD: syscalls.c,v 1.231 2009/07/19 02:54:21 rmind Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.227 2009/05/15 15:51:27 pooka Exp + * created from NetBSD: syscalls.master,v 1.228 2009/07/19 02:50:44 rmind Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.230 2009/05/15 15:52:39 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.231 2009/07/19 02:54:21 rmind Exp $); #if defined(_KERNEL_OPT) #include opt_modular.h Index: src/sys/sys/syscall.h diff -u src/sys/sys/syscall.h:1.227 src/sys/sys/syscall.h:1.228 --- src/sys/sys/syscall.h:1.227 Fri May 15 15:52:40 2009 +++ src/sys/sys/syscall.h Sun Jul 19 02:54:22 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: syscall.h,v 1.227 2009/05/15 15:52:40 pooka Exp $ */ +/* $NetBSD: syscall.h,v 1.228 2009/07/19 02:54:22 rmind Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.227 2009/05/15
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: dholland Date: Sun Jul 19 03:39:14 UTC 2009 Modified Files: src/sys/ufs/lfs: lfs.h Log Message: typo in comment To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/ufs/lfs/lfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/lfs/lfs.h diff -u src/sys/ufs/lfs/lfs.h:1.127 src/sys/ufs/lfs/lfs.h:1.128 --- src/sys/ufs/lfs/lfs.h:1.127 Fri May 16 09:22:00 2008 +++ src/sys/ufs/lfs/lfs.h Sun Jul 19 03:39:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs.h,v 1.127 2008/05/16 09:22:00 hannken Exp $ */ +/* $NetBSD: lfs.h,v 1.128 2009/07/19 03:39:14 dholland Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -536,7 +536,7 @@ /* * Get the head of the inode free list. - * Always caled with the segment lock held. + * Always called with the segment lock held. */ #define LFS_GET_HEADFREE(FS, CIP, BP, FREEP) do { \ if ((FS)-lfs_version 1) { \
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: dholland Date: Sun Jul 19 04:16:23 UTC 2009 Modified Files: src/sys/ufs/lfs: lfs_debug.c Log Message: minor knf To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/ufs/lfs/lfs_debug.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/lfs/lfs_debug.c diff -u src/sys/ufs/lfs/lfs_debug.c:1.37 src/sys/ufs/lfs/lfs_debug.c:1.38 --- src/sys/ufs/lfs/lfs_debug.c:1.37 Mon Apr 28 20:24:11 2008 +++ src/sys/ufs/lfs/lfs_debug.c Sun Jul 19 04:16:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_debug.c,v 1.37 2008/04/28 20:24:11 martin Exp $ */ +/* $NetBSD: lfs_debug.c,v 1.38 2009/07/19 04:16:23 dholland Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lfs_debug.c,v 1.37 2008/04/28 20:24:11 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: lfs_debug.c,v 1.38 2009/07/19 04:16:23 dholland Exp $); #ifdef DEBUG @@ -82,9 +82,11 @@ int lfs_lognum; struct lfs_log_entry lfs_log[LFS_LOGLENGTH]; -int lfs_bwrite_log(struct buf *bp, const char *file, int line) +int +lfs_bwrite_log(struct buf *bp, const char *file, int line) { struct vop_bwrite_args a; + a.a_desc = VDESC(vop_bwrite); a.a_bp = bp; @@ -95,7 +97,8 @@ return (VCALL(bp-b_vp, VOFFSET(vop_bwrite), a)); } -void lfs_dumplog(void) +void +lfs_dumplog(void) { int i; const char *cp;
CVS commit: src/sys/arch/atari/dev
Module Name:src Committed By: tsutsui Date: Sun Jul 19 05:46:15 UTC 2009 Modified Files: src/sys/arch/atari/dev: zs.c Log Message: Replace one missed bcopy(9) with memcpy(9). To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/atari/dev/zs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/atari/dev/zs.c diff -u src/sys/arch/atari/dev/zs.c:1.63 src/sys/arch/atari/dev/zs.c:1.64 --- src/sys/arch/atari/dev/zs.c:1.63 Sun Jul 19 05:43:23 2009 +++ src/sys/arch/atari/dev/zs.c Sun Jul 19 05:46:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.63 2009/07/19 05:43:23 tsutsui Exp $ */ +/* $NetBSD: zs.c,v 1.64 2009/07/19 05:46:15 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -79,7 +79,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.63 2009/07/19 05:43:23 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.64 2009/07/19 05:46:15 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -761,8 +761,8 @@ c = zc-zc_csr; if((c ZSRR0_DCD) == 0) cs-cs_preg[3] = ~ZSWR3_HFC; -bcopy((void *)cs-cs_preg, -(void *)cs-cs_creg, 16); +memcpy((void *)cs-cs_creg, +(void *)cs-cs_preg, 16); zs_loadchannelregs(zc, cs-cs_creg); splx(sps); cs-cs_heldchange = 0;