CVS commit: src/lib/libc/stdio
Module Name:src Committed By: dsl Date: Thu Oct 15 06:19:35 UTC 2009 Modified Files: src/lib/libc/stdio: vfprintf.c Log Message: Reverse previous, committed by mistake. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/lib/libc/stdio/vfprintf.c 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/stdio/vfprintf.c diff -u src/lib/libc/stdio/vfprintf.c:1.58 src/lib/libc/stdio/vfprintf.c:1.59 --- src/lib/libc/stdio/vfprintf.c:1.58 Wed Oct 14 21:25:52 2009 +++ src/lib/libc/stdio/vfprintf.c Thu Oct 15 06:19:35 2009 @@ -1,1183 +1,2 @@ -#if 0 -/* Contains my POSITIONAL_PARAMS code */ -/* $NetBSD: vfprintf.c,v 1.58 2009/10/14 21:25:52 dsl Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - */ - -#include sys/cdefs.h -#if defined(LIBC_SCCS) !defined(lint) -#if 0 -static char *sccsid = @(#)vfprintf.c 5.50 (Berkeley) 12/16/92; -#else -__RCSID($NetBSD: vfprintf.c,v 1.58 2009/10/14 21:25:52 dsl Exp $); -#endif -#endif /* LIBC_SCCS and not lint */ - -/* - * Actual printf innards. - * - * This code is large and complicated... - */ - -#include namespace.h -#include sys/types.h - -#include assert.h -#include errno.h -#include stdarg.h -#include stddef.h -#include stdint.h -#include stdio.h -#include stdlib.h -#include string.h -#include wchar.h - -#include reentrant.h -#include local.h -#include fvwrite.h -#include extern.h - -#ifdef FLOATING_POINT -#define POSITIONAL_PARAMS -#endif - -static int __sprint __P((FILE *, struct __suio *)); -static int __sbprintf __P((FILE *, const char *, va_list)) - __attribute__((__format__(__printf__, 2, 0))); -#ifdef POSITIONAL_PARAMS -#define NL_ARGMAX 9 /* minimum required by IEEE Std 1003.1-2001 */ - -union parg { - int flags; - uintmax_t _uintmax; - void *_pointer; - double _double; -}; -static void set_printf_args(union parg *, const char *, _BSD_VA_LIST_); -#endif - -/* - * Flush out all the vectors defined by the given uio, - * then reset it so that it can be reused. - */ -/* NB: async-signal-safe when fp-_flags __SAFE */ -static int -__sprint(fp, uio) - FILE *fp; - struct __suio *uio; -{ - int err; - - _DIAGASSERT(fp != NULL); - _DIAGASSERT(uio != NULL); - - if (uio-uio_resid == 0) { - uio-uio_iovcnt = 0; - return (0); - } - err = __sfvwrite(fp, uio); - uio-uio_resid = 0; - uio-uio_iovcnt = 0; - return (err); -} - -/* - * Helper function for `fprintf to unbuffered unix file': creates a - * temporary buffer. We only work on write-only files; this avoids - * worries about ungetc buffers and so forth. - */ -static int -__sbprintf(fp, fmt, ap) - FILE *fp; - const char *fmt; - va_list ap; -{ - int ret; - FILE fake; - struct __sfileext fakeext; - unsigned char buf[BUFSIZ]; - - _DIAGASSERT(fp != NULL); - _DIAGASSERT(fmt != NULL); - - _FILEEXT_SETUP(fake, fakeext); - - /* copy the important variables */ - fake._flags = fp-_flags ~__SNBF; - fake._file = fp-_file; - fake._cookie = fp-_cookie; - fake._write = fp-_write; - - /* set up the buffer */ - fake._bf._base = fake._p = buf; - fake._bf._size = fake._w = sizeof(buf); - fake._lbfsize = 0; /* not actually used, but Just In Case */ - - /* do the work, then copy any error status */ - ret = vfprintf(fake, fmt, ap); - if (ret = 0 fflush(fake)) - ret = -1; - if
CVS commit: [netbsd-5-0] src/etc
Module Name:src Committed By: sborrill Date: Thu Oct 15 08:21:05 UTC 2009 Modified Files: src/etc [netbsd-5-0]: Makefile Removed Files: src/etc [netbsd-5-0]: audit-packages.conf Log Message: Pull up the following additional revisions(s) required by ticket #784: etc/Makefile: revision 1.365 etc/audit-packages.conf:removed Retire audit-packages.conf, it was obsoleted by the pullup of pkg_install-20090201. To generate a diff of this commit: cvs rdiff -u -r1.359.2.3 -r1.359.2.3.2.1 src/etc/Makefile cvs rdiff -u -r1.1 -r0 src/etc/audit-packages.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.359.2.3 src/etc/Makefile:1.359.2.3.2.1 --- src/etc/Makefile:1.359.2.3 Fri Mar 27 14:50:35 2009 +++ src/etc/Makefile Thu Oct 15 08:21:05 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.359.2.3 2009/03/27 14:50:35 msaitoh Exp $ +# $NetBSD: Makefile,v 1.359.2.3.2.1 2009/10/15 08:21:05 sborrill Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -88,7 +88,7 @@ BINOWN= root BINGRP= wheel UTMPGRP= utmp -BIN1+= audit-packages.conf bootptab changelist csh.cshrc csh.login \ +BIN1+= bootptab changelist csh.cshrc csh.login \ csh.logout daily daily.conf dm.conf envsys.conf floppytab ftpchroot \ ftpusers gettytab group hosts hosts.lpd inetd.conf lkm.conf \ locate.conf login.conf mailer.conf man.conf monthly monthly.conf \
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: sborrill Date: Thu Oct 15 08:22:31 UTC 2009 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 Log Message: Additional pullups for ticket 784 To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-5.0.2 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.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.18 src/doc/CHANGES-5.0.2:1.1.2.19 --- src/doc/CHANGES-5.0.2:1.1.2.18 Wed Oct 14 18:40:01 2009 +++ src/doc/CHANGES-5.0.2 Thu Oct 15 08:22:31 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.18 2009/10/14 18:40:01 sborrill Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.19 2009/10/15 08:22:31 sborrill Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -323,3 +323,10 @@ Avoid segv on printf '%*s' 666. [christos, ticket #1091] +etc/Makefile 1.365 +etc/audit-packages.confremoved + + Retire audit-packages.conf, it was obsoleted by the + merge of pkg_install-20090201. + [joerg, ticket #784] +
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: hannken Date: Thu Oct 15 10:05:48 UTC 2009 Modified Files: src/sys/ufs/ffs: ffs_snapshot.c Log Message: No longer abuse TAILQ internal data. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/ufs/ffs/ffs_snapshot.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/ffs/ffs_snapshot.c diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.96 src/sys/ufs/ffs/ffs_snapshot.c:1.97 --- src/sys/ufs/ffs/ffs_snapshot.c:1.96 Tue Oct 13 12:38:14 2009 +++ src/sys/ufs/ffs/ffs_snapshot.c Thu Oct 15 10:05:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_snapshot.c,v 1.96 2009/10/13 12:38:14 hannken Exp $ */ +/* $NetBSD: ffs_snapshot.c,v 1.97 2009/10/15 10:05:48 hannken Exp $ */ /* * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.96 2009/10/13 12:38:14 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.97 2009/10/15 10:05:48 hannken Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -76,6 +76,14 @@ #include uvm/uvm.h +struct snap_info { + kmutex_t si_lock; /* Lock this snapinfo */ + kmutex_t si_snaplock; /* Snapshot vnode common lock */ + TAILQ_HEAD(inodelst, inode) si_snapshots; /* List of active snapshots */ + daddr_t *si_snapblklist; /* Snapshot block hints list */ + uint32_t si_gen; /* Incremented on change */ +}; + #if !defined(FFS_NO_SNAPSHOT) typedef int (*acctfunc_t) (struct vnode *, void *, int, int, struct fs *, daddr_t, int); @@ -107,6 +115,7 @@ static int syncsnap(struct vnode *); static int wrsnapblk(struct vnode *, void *, daddr_t); +static inline bool is_active_snapshot(struct snap_info *, struct inode *); static inline daddr_t db_get(struct inode *, int); static inline void db_assign(struct inode *, int, daddr_t); static inline daddr_t ib_get(struct inode *, int); @@ -114,14 +123,6 @@ static inline daddr_t idb_get(struct inode *, void *, int); static inline void idb_assign(struct inode *, void *, int, daddr_t); -struct snap_info { - kmutex_t si_lock; /* Lock this snapinfo */ - kmutex_t si_snaplock; /* Snapshot vnode common lock */ - TAILQ_HEAD(inodelst, inode) si_snapshots; /* List of active snapshots */ - daddr_t *si_snapblklist; /* Snapshot block hints list */ - uint32_t si_gen; /* Incremented on change */ -}; - #ifdef DEBUG static int snapdebug = 0; #endif @@ -277,7 +278,7 @@ fs-fs_snapinum[snaploc] = ip-i_number; mutex_enter(si-si_lock); - if (ip-i_nextsnap.tqe_prev != 0) + if (is_active_snapshot(si, ip)) panic(ffs_snapshot: %PRIu64 already on list, ip-i_number); TAILQ_INSERT_TAIL(si-si_snapshots, ip, i_nextsnap); if (TAILQ_FIRST(si-si_snapshots) == ip) { @@ -1318,10 +1319,9 @@ * * Clear copy-on-write flag if last snapshot. */ - if (ip-i_nextsnap.tqe_prev != 0) { - mutex_enter(si-si_lock); + mutex_enter(si-si_lock); + if (is_active_snapshot(si, ip)) { TAILQ_REMOVE(si-si_snapshots, ip, i_nextsnap); - ip-i_nextsnap.tqe_prev = 0; if (TAILQ_FIRST(si-si_snapshots) != 0) { /* Roll back the list of preallocated blocks. */ xp = TAILQ_LAST(si-si_snapshots, inodelst); @@ -1338,7 +1338,8 @@ free(ip-i_snapblklist, M_UFSMNT); ip-i_snapblklist = NULL; } - } + } else + mutex_exit(si-si_lock); /* * Clear all BLK_NOCOPY fields. Pass any block claims to other * snapshots that want them (see ffs_snapblkfree below). @@ -1678,9 +1679,9 @@ /* * Link it onto the active snapshot list. */ - if (ip-i_nextsnap.tqe_prev != 0) - panic(ffs_snapshot_mount: %llu already on list, - (unsigned long long)ip-i_number); + if (is_active_snapshot(si, ip)) + panic(ffs_snapshot_mount: %PRIu64 already on list, + ip-i_number); else TAILQ_INSERT_TAIL(si-si_snapshots, ip, i_nextsnap); vp-v_vflag |= VV_SYSTEM; @@ -1720,7 +1721,6 @@ while ((xp = TAILQ_FIRST(si-si_snapshots)) != 0) { vp = ITOV(xp); TAILQ_REMOVE(si-si_snapshots, xp, i_nextsnap); - xp-i_nextsnap.tqe_prev = 0; if (xp-i_snapblklist == si-si_snapblklist) si-si_snapblklist = NULL; free(xp-i_snapblklist, M_UFSMNT); @@ -2121,6 +2121,23 @@ } /* + * Check if this inode is present on the active snapshot list. + * Must be called with snapinfo locked. + */ +static inline bool +is_active_snapshot(struct snap_info *si, struct inode *ip) +{ + struct inode *xp; + + KASSERT(mutex_owned(si-si_lock)); + + TAILQ_FOREACH(xp, si-si_snapshots, i_nextsnap) + if (xp == ip) + return true; + return false; +} + +/* * Get/Put direct block from inode or buffer containing disk addresses. Take * care for fs type (UFS1/UFS2) and byte swapping. These functions should go * into a global include.
CVS commit: src/external/bsd/fetch/dist/libfetch
Module Name:src Committed By: joerg Date: Thu Oct 15 13:00:00 UTC 2009 Update of /cvsroot/src/external/bsd/fetch/dist/libfetch In directory ivanova.netbsd.org:/tmp/cvs-serv26882 Log Message: libfetch-2.26: - Add support to aggressively cache directory listenings, useful for HTTP - Avoid leaking memory in error cases. From Xavier from Arch Linux. Status: Vendor Tag: PKGSRC Release Tags: libfetch-2-26 U src/external/bsd/fetch/dist/libfetch/errlist.sh U src/external/bsd/fetch/dist/libfetch/common.c U src/external/bsd/fetch/dist/libfetch/common.h U src/external/bsd/fetch/dist/libfetch/fetch.cat3 U src/external/bsd/fetch/dist/libfetch/fetch.3 U src/external/bsd/fetch/dist/libfetch/fetch.c U src/external/bsd/fetch/dist/libfetch/ftp.errors U src/external/bsd/fetch/dist/libfetch/fetch.h U src/external/bsd/fetch/dist/libfetch/file.c U src/external/bsd/fetch/dist/libfetch/ftp.c U src/external/bsd/fetch/dist/libfetch/http.errors U src/external/bsd/fetch/dist/libfetch/http.c No conflicts created by this import
CVS commit: src/external/bsd/pkg_install/dist
Module Name:src Committed By: joerg Date: Thu Oct 15 13:01:28 UTC 2009 Update of /cvsroot/src/external/bsd/pkg_install/dist In directory ivanova.netbsd.org:/tmp/cvs-serv19636 Log Message: pkg_install-20091015: Use directory index caching by default. Status: Vendor Tag: PKGSRC Release Tags: pkg_install-20091015 U src/external/bsd/pkg_install/dist/add/add.h U src/external/bsd/pkg_install/dist/add/main.c U src/external/bsd/pkg_install/dist/add/perform.c U src/external/bsd/pkg_install/dist/add/pkg_add.1 U src/external/bsd/pkg_install/dist/admin/README U src/external/bsd/pkg_install/dist/admin/admin.h U src/external/bsd/pkg_install/dist/admin/audit-packages.sh.in U src/external/bsd/pkg_install/dist/admin/audit.c U src/external/bsd/pkg_install/dist/admin/check.c U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.sh.in U src/external/bsd/pkg_install/dist/admin/main.c U src/external/bsd/pkg_install/dist/admin/pkg_admin.1 U src/external/bsd/pkg_install/dist/bpm/bpm.1 U src/external/bsd/pkg_install/dist/bpm/bpm.sh.in U src/external/bsd/pkg_install/dist/create/build.c U src/external/bsd/pkg_install/dist/create/create.h U src/external/bsd/pkg_install/dist/create/main.c U src/external/bsd/pkg_install/dist/create/perform.c U src/external/bsd/pkg_install/dist/create/pkg_create.1 U src/external/bsd/pkg_install/dist/create/pl.c U src/external/bsd/pkg_install/dist/create/util.c U src/external/bsd/pkg_install/dist/delete/pkg_delete.1 U src/external/bsd/pkg_install/dist/delete/pkg_delete.c U src/external/bsd/pkg_install/dist/info/info.h U src/external/bsd/pkg_install/dist/info/main.c U src/external/bsd/pkg_install/dist/info/perform.c U src/external/bsd/pkg_install/dist/info/pkg_info.1 U src/external/bsd/pkg_install/dist/info/show.c U src/external/bsd/pkg_install/dist/lib/automatic.c U src/external/bsd/pkg_install/dist/lib/config.h.in U src/external/bsd/pkg_install/dist/lib/conflicts.c U src/external/bsd/pkg_install/dist/lib/decompress.c U src/external/bsd/pkg_install/dist/lib/defs.h U src/external/bsd/pkg_install/dist/lib/dewey.c U src/external/bsd/pkg_install/dist/lib/dewey.h U src/external/bsd/pkg_install/dist/lib/fexec.c U src/external/bsd/pkg_install/dist/lib/file.c U src/external/bsd/pkg_install/dist/lib/global.c U src/external/bsd/pkg_install/dist/lib/gpgsig.c U src/external/bsd/pkg_install/dist/lib/iterate.c U src/external/bsd/pkg_install/dist/lib/lib.h U src/external/bsd/pkg_install/dist/lib/license.c U src/external/bsd/pkg_install/dist/lib/lpkg.c U src/external/bsd/pkg_install/dist/lib/opattern.c U src/external/bsd/pkg_install/dist/lib/pkcs7.c U src/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in U src/external/bsd/pkg_install/dist/lib/pkg_io.c U src/external/bsd/pkg_install/dist/lib/pkg_signature.c U src/external/bsd/pkg_install/dist/lib/pkg_summary.5 U src/external/bsd/pkg_install/dist/lib/pkgdb.c U src/external/bsd/pkg_install/dist/lib/pkgsrc.7 U src/external/bsd/pkg_install/dist/lib/plist.c U src/external/bsd/pkg_install/dist/lib/remove.c U src/external/bsd/pkg_install/dist/lib/str.c U src/external/bsd/pkg_install/dist/lib/var.c U src/external/bsd/pkg_install/dist/lib/version.c U src/external/bsd/pkg_install/dist/lib/version.h U src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c U src/external/bsd/pkg_install/dist/lib/xwrapper.c U src/external/bsd/pkg_install/dist/lib/parse-config.c U src/external/bsd/pkg_install/dist/x509/pkgsrc.cnf U src/external/bsd/pkg_install/dist/x509/pkgsrc.sh U src/external/bsd/pkg_install/dist/x509/signing.txt No conflicts created by this import
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Oct 15 16:39:22 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: emul.c locks.c rump.c rump_private.h rumpkern.ifspec scheduler.c sysproxy_socket.c src/sys/rump/librump/rumpkern/arch/i386: rumpcpu.c Log Message: Give lwp usage some much-needed love: stop treating lwp0 as the all-sink and make sure each separate thread in rump has its own lwp. Happy-go-lucky callers will get scheduled a temporary lwp on entry, while true lwp connoisseurs may request a stable lwp for their purposes. Some more love may be required later down the road, but for now different threads will stepping on each others toes. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.29 -r1.30 src/sys/rump/librump/rumpkern/locks.c cvs rdiff -u -r1.124 -r1.125 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.31 -r1.32 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/rumpkern.ifspec \ src/sys/rump/librump/rumpkern/scheduler.c cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/sysproxy_socket.c cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/arch/i386/rumpcpu.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/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.101 src/sys/rump/librump/rumpkern/emul.c:1.102 --- src/sys/rump/librump/rumpkern/emul.c:1.101 Thu Oct 15 00:28:46 2009 +++ src/sys/rump/librump/rumpkern/emul.c Thu Oct 15 16:39:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.101 2009/10/15 00:28:46 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.102 2009/10/15 16:39:22 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.101 2009/10/15 00:28:46 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.102 2009/10/15 16:39:22 pooka Exp $); #include sys/param.h #include sys/malloc.h @@ -442,7 +442,7 @@ k = kmem_alloc(sizeof(struct kthdesc), KM_SLEEP); k-f = func; k-arg = arg; - k-mylwp = l = rump_setup_curlwp(0, rump_nextlid(), 0); + k-mylwp = l = rump_lwp_alloc(0, rump_nextlid()); if (flags KTHREAD_MPSAFE) l-l_pflag |= LP_MPSAFE; rv = rumpuser_thread_create(threadbouncer, k, thrname); @@ -460,7 +460,7 @@ if ((curlwp-l_pflag LP_MPSAFE) == 0) KERNEL_UNLOCK_ONE(NULL); - rump_clear_curlwp(); + rump_lwp_release(curlwp); rump_unschedule(); rumpuser_thread_exit(); } Index: src/sys/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.29 src/sys/rump/librump/rumpkern/locks.c:1.30 --- src/sys/rump/librump/rumpkern/locks.c:1.29 Thu Oct 15 00:28:46 2009 +++ src/sys/rump/librump/rumpkern/locks.c Thu Oct 15 16:39:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.29 2009/10/15 00:28:46 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.30 2009/10/15 16:39:22 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.29 2009/10/15 00:28:46 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.30 2009/10/15 16:39:22 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -343,9 +343,11 @@ while (nlocks--) { if (!rumpuser_mutex_tryenter(rump_giantlock)) { - rump_unschedule(); + struct lwp *l = curlwp; + + rump_unschedule_cpu(l); rumpuser_mutex_enter_nowrap(rump_giantlock); - rump_schedule(); + rump_schedule_cpu(l); } lockcnt++; } @@ -382,14 +384,14 @@ { _kernel_unlock(nlocks, countp); - rump_unschedule(); + rump_unschedule_cpu(curlwp); } void rump_user_schedule(int nlocks) { - rump_schedule(); + rump_schedule_cpu(curlwp); if (nlocks) _kernel_lock(nlocks); Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.124 src/sys/rump/librump/rumpkern/rump.c:1.125 --- src/sys/rump/librump/rumpkern/rump.c:1.124 Thu Oct 15 00:28:46 2009 +++ src/sys/rump/librump/rumpkern/rump.c Thu Oct 15 16:39:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.124 2009/10/15 00:28:46 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.125 2009/10/15 16:39:22 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.124 2009/10/15 00:28:46 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.125 2009/10/15 16:39:22 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -388,34 +388,43 @@ return resid; } -/* public interface */ static pid_t nextpid = 1; struct lwp * rump_newproc_switch() { - struct lwp *oldlwp = curlwp; + struct lwp *l; pid_t mypid; mypid = atomic_inc_uint_nv(nextpid); if (__predict_false(mypid == 0)) mypid = atomic_inc_uint_nv(nextpid); -
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Thu Oct 15 16:40:15 UTC 2009 Modified Files: src/sys/rump/include/rump: rumpkern_if_pub.h src/sys/rump/librump/rumpkern: rumpkern_if_priv.h rumpkern_if_wrappers.c Log Message: regen: lwp interface changes To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/include/rump/rumpkern_if_pub.h cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.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/rump/include/rump/rumpkern_if_pub.h diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.3 src/sys/rump/include/rump/rumpkern_if_pub.h:1.4 --- src/sys/rump/include/rump/rumpkern_if_pub.h:1.3 Thu Oct 15 00:31:25 2009 +++ src/sys/rump/include/rump/rumpkern_if_pub.h Thu Oct 15 16:40:15 2009 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpkern_if_pub.h,v 1.3 2009/10/15 00:31:25 pooka Exp $ */ +/* $NetBSD: rumpkern_if_pub.h,v 1.4 2009/10/15 16:40:15 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.1 2009/10/14 17:17:00 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.2 2009/10/15 16:39:22 pooka Exp * by: NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp */ @@ -18,10 +18,11 @@ kauth_cred_t rump_pub_cred_suserget(void); void rump_pub_cred_put(kauth_cred_t); struct lwp * rump_pub_newproc_switch(void); -struct lwp * rump_pub_setup_curlwp(pid_t, lwpid_t, int); -struct lwp * rump_pub_get_curlwp(void); -void rump_pub_set_curlwp(struct lwp *); -void rump_pub_clear_curlwp(void); +struct lwp * rump_pub_lwp_alloc(pid_t, lwpid_t); +struct lwp * rump_pub_lwp_alloc_and_switch(pid_t, lwpid_t); +struct lwp * rump_pub_lwp_curlwp(void); +void rump_pub_lwp_switch(struct lwp *); +void rump_pub_lwp_release(struct lwp *); int rump_pub_sysproxy_set(rump_sysproxy_t, void *); int rump_pub_sysproxy_socket_setup_client(int); int rump_pub_sysproxy_socket_setup_server(int); Index: src/sys/rump/librump/rumpkern/rumpkern_if_priv.h diff -u src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.3 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.4 --- src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.3 Thu Oct 15 00:31:25 2009 +++ src/sys/rump/librump/rumpkern/rumpkern_if_priv.h Thu Oct 15 16:40:15 2009 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpkern_if_priv.h,v 1.3 2009/10/15 00:31:25 pooka Exp $ */ +/* $NetBSD: rumpkern_if_priv.h,v 1.4 2009/10/15 16:40:15 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.1 2009/10/14 17:17:00 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.2 2009/10/15 16:39:22 pooka Exp * by: NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp */ @@ -18,10 +18,11 @@ kauth_cred_t rump_cred_suserget(void); void rump_cred_put(kauth_cred_t); struct lwp * rump_newproc_switch(void); -struct lwp * rump_setup_curlwp(pid_t, lwpid_t, int); -struct lwp * rump_get_curlwp(void); -void rump_set_curlwp(struct lwp *); -void rump_clear_curlwp(void); +struct lwp * rump_lwp_alloc(pid_t, lwpid_t); +struct lwp * rump_lwp_alloc_and_switch(pid_t, lwpid_t); +struct lwp * rump_lwp_curlwp(void); +void rump_lwp_switch(struct lwp *); +void rump_lwp_release(struct lwp *); int rump_sysproxy_set(rump_sysproxy_t, void *); int rump_sysproxy_socket_setup_client(int); int rump_sysproxy_socket_setup_server(int); Index: src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c diff -u src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.3 src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.4 --- src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.3 Thu Oct 15 00:31:25 2009 +++ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c Thu Oct 15 16:40:15 2009 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpkern_if_wrappers.c,v 1.3 2009/10/15 00:31:25 pooka Exp $ */ +/* $NetBSD: rumpkern_if_wrappers.c,v 1.4 2009/10/15 16:40:15 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.1 2009/10/14 17:17:00 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.2 2009/10/15 16:39:22 pooka Exp * by: NetBSD: makerumpif.sh,v 1.4 2009/10/15 00:29:19 pooka Exp */ @@ -162,44 +162,56 @@ } struct lwp * -rump_pub_setup_curlwp(pid_t arg1, lwpid_t arg2, int arg3) +rump_pub_lwp_alloc(pid_t arg1, lwpid_t arg2) { struct lwp * rv; rump_schedule(); - rv = rump_setup_curlwp(arg1, arg2, arg3); + rv = rump_lwp_alloc(arg1, arg2); rump_unschedule(); return rv; } struct lwp * -rump_pub_get_curlwp(void) +rump_pub_lwp_alloc_and_switch(pid_t arg1, lwpid_t arg2) { struct lwp * rv; rump_schedule(); - rv = rump_get_curlwp(); + rv = rump_lwp_alloc_and_switch(arg1, arg2); + rump_unschedule(); + + return rv; +} + +struct lwp * +rump_pub_lwp_curlwp(void) +{ + struct lwp * rv; + + rump_schedule(); + rv = rump_lwp_curlwp(); rump_unschedule();
CVS commit: src/lib
Module Name:src Committed By: pooka Date: Thu Oct 15 16:41:08 UTC 2009 Modified Files: src/lib/libp2k: p2k.c src/lib/libukfs: ukfs.c Log Message: use newstyle rump lwp interfaces To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libp2k/p2k.c cvs rdiff -u -r1.40 -r1.41 src/lib/libukfs/ukfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libp2k/p2k.c diff -u src/lib/libp2k/p2k.c:1.23 src/lib/libp2k/p2k.c:1.24 --- src/lib/libp2k/p2k.c:1.23 Wed Oct 14 18:22:50 2009 +++ src/lib/libp2k/p2k.c Thu Oct 15 16:41:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: p2k.c,v 1.23 2009/10/14 18:22:50 pooka Exp $ */ +/* $NetBSD: p2k.c,v 1.24 2009/10/15 16:41:08 pooka Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -126,7 +126,7 @@ cred = cred_create(pcn-pcn_cred); /* LINTED: prehistoric types in first two args */ return rump_pub_makecn(pcn-pcn_nameiop, pcn-pcn_flags | myflags, - pcn-pcn_name, pcn-pcn_namelen, cred, rump_pub_get_curlwp()); + pcn-pcn_name, pcn-pcn_namelen, cred, rump_pub_lwp_curlwp()); } static __inline void @@ -143,7 +143,7 @@ lwpid_t lid; puffs_cc_getcaller(puffs_cc_getcc(pu), pid, lid); - rump_pub_setup_curlwp(pid, lid, 1); + rump_pub_lwp_alloc_and_switch(pid, lid); } /*ARGSUSED*/ @@ -151,7 +151,7 @@ clearlwp(struct puffs_usermount *pu) { - rump_pub_clear_curlwp(); + rump_pub_lwp_release(rump_pub_lwp_curlwp()); } static __inline struct p2k_vp_hash * @@ -467,7 +467,7 @@ struct p2k_mount *p2m = ukfs_getspecific(fs); int error = 0; - rump_pub_clear_curlwp(); /* ukfs does its own curlwp tricks */ + rump_pub_lwp_release(rump_pub_lwp_curlwp()); /* ukfs curlwp tricks */ rump_pub_vp_rele(p2m-p2m_rvp); if (ukfs_release(fs, 0) != 0) { @@ -476,7 +476,7 @@ } p2m-p2m_ukfs = NULL; - rump_pub_setup_curlwp(0, 1, 1); + rump_pub_lwp_alloc_and_switch(0, 0); return error; } Index: src/lib/libukfs/ukfs.c diff -u src/lib/libukfs/ukfs.c:1.40 src/lib/libukfs/ukfs.c:1.41 --- src/lib/libukfs/ukfs.c:1.40 Wed Oct 14 18:22:50 2009 +++ src/lib/libukfs/ukfs.c Thu Oct 15 16:41:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ukfs.c,v 1.40 2009/10/14 18:22:50 pooka Exp $ */ +/* $NetBSD: ukfs.c,v 1.41 2009/10/15 16:41:08 pooka Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -141,7 +141,7 @@ { struct vnode *rvp, *cvp; - rump_pub_setup_curlwp(nextpid(ukfs), 1, 1); + rump_pub_lwp_alloc_and_switch(nextpid(ukfs), 1); rvp = ukfs_getrvp(ukfs); pthread_spin_lock(ukfs-ukfs_spin); cvp = ukfs-ukfs_cdir; @@ -158,7 +158,7 @@ rvp = ukfs_getrvp(ukfs); rump_pub_rcvp_set(NULL, rvp); rump_pub_vp_rele(rvp); - rump_pub_clear_curlwp(); + rump_pub_lwp_release(rump_pub_lwp_curlwp()); } int @@ -435,19 +435,19 @@ mntflag = 0; if (flags UKFS_RELFLAG_FORCE) mntflag = MNT_FORCE; - rump_pub_setup_curlwp(nextpid(fs), 1, 1); + rump_pub_lwp_alloc_and_switch(nextpid(fs), 1); rump_pub_vp_rele(fs-ukfs_rvp); fs-ukfs_rvp = NULL; rv = rump_sys_unmount(fs-ukfs_mountpath, mntflag); if (rv == -1) { error = errno; rump_pub_vfs_root(fs-ukfs_mp, fs-ukfs_rvp, 0); - rump_pub_clear_curlwp(); + rump_pub_lwp_release(rump_pub_lwp_curlwp()); ukfs_chdir(fs, fs-ukfs_mountpath); errno = error; return -1; } - rump_pub_clear_curlwp(); + rump_pub_lwp_release(rump_pub_lwp_curlwp()); } if (fs-ukfs_devpath) {
CVS commit: src/sys/rump/include/machine
Module Name:src Committed By: pooka Date: Thu Oct 15 16:46:37 UTC 2009 Modified Files: src/sys/rump/include/machine: cpu.h Log Message: rump_get_curlwp() is dead To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/rump/include/machine/cpu.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/rump/include/machine/cpu.h diff -u src/sys/rump/include/machine/cpu.h:1.11 src/sys/rump/include/machine/cpu.h:1.12 --- src/sys/rump/include/machine/cpu.h:1.11 Thu Oct 15 01:50:08 2009 +++ src/sys/rump/include/machine/cpu.h Thu Oct 15 16:46:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.11 2009/10/15 01:50:08 pooka Exp $ */ +/* $NetBSD: cpu.h,v 1.12 2009/10/15 16:46:37 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -72,8 +72,8 @@ void __syncicache(void *, size_t); #endif -struct lwp *rump_get_curlwp(void); /* XXX */ -#define curlwp rump_get_curlwp() +struct lwp *rumpuser_get_curlwp(void); +#define curlwp rumpuser_get_curlwp() #define curcpu() (curlwp-l_cpu) #define cpu_number() 0 /* XXX: not good enuf */
CVS commit: src/tests/syscall
Module Name:src Committed By: pooka Date: Thu Oct 15 16:47:23 UTC 2009 Modified Files: src/tests/syscall: t_cmsg.c Log Message: fix test for new-world rump lwp usage To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/syscall/t_cmsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/syscall/t_cmsg.c diff -u src/tests/syscall/t_cmsg.c:1.8 src/tests/syscall/t_cmsg.c:1.9 --- src/tests/syscall/t_cmsg.c:1.8 Wed Oct 14 18:22:50 2009 +++ src/tests/syscall/t_cmsg.c Thu Oct 15 16:47:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cmsg.c,v 1.8 2009/10/14 18:22:50 pooka Exp $ */ +/* $NetBSD: t_cmsg.c,v 1.9 2009/10/15 16:47:23 pooka Exp $ */ #include sys/types.h #include sys/mount.h @@ -104,6 +104,9 @@ if (rump_sys_mount(MOUNT_TMPFS, /, 0, args, sizeof(args)) == -1) atf_tc_fail_errno(mount tmpfs); + /* store our current lwp/proc */ + l1 = rump_pub_newproc_switch(); + /* create unix socket and bind it to a path */ memset(sun, 0, sizeof(sun)); sun.sun_family = AF_LOCAL; @@ -117,9 +120,6 @@ if (rump_sys_listen(s1, 1) == -1) atf_tc_fail_errno(socket 1 listen); - /* store our current lwp/proc */ - l1 = rump_pub_get_curlwp(); - /* create new process */ l2 = rump_pub_newproc_switch(); @@ -166,7 +166,7 @@ atf_tc_fail_errno(sendmsg failed); /* switch back to original proc */ - rump_set_curlwp(l1); + rump_pub_lwp_switch(l1); /* accept connection and read fd */ sl = sizeof(sun);
CVS commit: src/tests/syscall
Module Name:src Committed By: pooka Date: Thu Oct 15 16:50:00 UTC 2009 Modified Files: src/tests/syscall: t_cmsg.c Log Message: comment adjustment. hardly any functional change involved. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/syscall/t_cmsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/syscall/t_cmsg.c diff -u src/tests/syscall/t_cmsg.c:1.9 src/tests/syscall/t_cmsg.c:1.10 --- src/tests/syscall/t_cmsg.c:1.9 Thu Oct 15 16:47:23 2009 +++ src/tests/syscall/t_cmsg.c Thu Oct 15 16:50:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cmsg.c,v 1.9 2009/10/15 16:47:23 pooka Exp $ */ +/* $NetBSD: t_cmsg.c,v 1.10 2009/10/15 16:50:00 pooka Exp $ */ #include sys/types.h #include sys/mount.h @@ -104,7 +104,7 @@ if (rump_sys_mount(MOUNT_TMPFS, /, 0, args, sizeof(args)) == -1) atf_tc_fail_errno(mount tmpfs); - /* store our current lwp/proc */ + /* create first (non-proc0) process to be used in test */ l1 = rump_pub_newproc_switch(); /* create unix socket and bind it to a path */ @@ -120,7 +120,7 @@ if (rump_sys_listen(s1, 1) == -1) atf_tc_fail_errno(socket 1 listen); - /* create new process */ + /* create second process for test */ l2 = rump_pub_newproc_switch(); /* connect to unix domain socket */
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Thu Oct 15 17:26:57 UTC 2009 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read.3 archive_write.3 archive_write_disk.3 Log Message: Do not use .Xo/.Xc to work around ancient groff limits. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write.3 \ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libarchive/dist/libarchive/archive_read.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.1.1.1 Fri Sep 19 21:56:14 2008 +++ src/external/bsd/libarchive/dist/libarchive/archive_read.3 Thu Oct 15 17:26:57 2009 @@ -176,13 +176,11 @@ Allocates and initializes a .Tn struct archive object suitable for reading from an archive. -.It Xo -.Fn archive_read_support_compression_all , -.Fn archive_read_support_compression_bzip2 , -.Fn archive_read_support_compression_compress , -.Fn archive_read_support_compression_gzip , -.Fn archive_read_support_compression_none -.Xc +.It Fn archive_read_support_compression_all , \ +Fn archive_read_support_compression_bzip2 , \ +Fn archive_read_support_compression_compress , \ +Fn archive_read_support_compression_gzip , \ +Fn archive_read_support_compression_none Enables auto-detection code and decompression support for the specified compression. Note that @@ -196,14 +194,12 @@ Note that this disables automatic detection of the compression format, so it makes no sense to specify this in conjunction with any other decompression option. -.It Xo -.Fn archive_read_support_format_all , -.Fn archive_read_support_format_cpio , -.Fn archive_read_support_format_empty , -.Fn archive_read_support_format_iso9660 , -.Fn archive_read_support_format_tar , -.Fn archive_read_support_format_zip -.Xc +.It Fn archive_read_support_format_all , \ +Fn archive_read_support_format_cpio , \ +Fn archive_read_support_format_empty , \ +Fn archive_read_support_format_iso9660 , \ +Fn archive_read_support_format_tar , \ +Fn archive_read_support_format_zip Enables support---including auto-detection code---for the specified archive format. For example, Index: src/external/bsd/libarchive/dist/libarchive/archive_write.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.1.1.1 Fri Sep 19 21:56:14 2008 +++ src/external/bsd/libarchive/dist/libarchive/archive_write.3 Thu Oct 15 17:26:57 2009 @@ -167,14 +167,12 @@ .It Fn archive_write_get_bytes_in_last_block Retrieve the currently-set value for last block size. A value of -1 here indicates that the library should use default values. -.It Xo -.Fn archive_write_set_format_cpio , -.Fn archive_write_set_format_pax , -.Fn archive_write_set_format_pax_restricted , -.Fn archive_write_set_format_shar , -.Fn archive_write_set_format_shar_binary , -.Fn archive_write_set_format_ustar -.Xc +.It Fn archive_write_set_format_cpio , \ +Fn archive_write_set_format_pax , \ +Fn archive_write_set_format_pax_restricted , \ +Fn archive_write_set_format_shar , \ +Fn archive_write_set_format_shar_binary , \ +Fn archive_write_set_format_ustar Sets the format that will be used for the archive. The library can write POSIX octet-oriented cpio format archives, @@ -198,12 +196,10 @@ is the library default; this is the same as pax format, but suppresses the pax extended header for most normal files. In most cases, this will result in ordinary ustar archives. -.It Xo -.Fn archive_write_set_compression_bzip2 , -.Fn archive_write_set_compression_compress , -.Fn archive_write_set_compression_gzip , -.Fn archive_write_set_compression_none -.Xc +.It Fn archive_write_set_compression_bzip2 , \ +Fn archive_write_set_compression_compress , \ +Fn archive_write_set_compression_gzip , \ +Fn archive_write_set_compression_none The resulting archive will be compressed as specified. Note that the compressed output is always properly blocked. .It Fn archive_write_set_compression_program Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.1.1.1 Fri Sep 19 21:56:14 2008 +++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3 Thu Oct 15 17:26:57 2009 @@ -174,10 +174,8 @@ Scan data for blocks of NUL bytes and try to recreate them with holes. This
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: plunky Date: Thu Oct 15 20:35:07 UTC 2009 Modified Files: src/usr.sbin/syslogd: syslogd.8 Log Message: reinstate a sentence partly removed in v1.43 regarding the default facility/priority for local kernel messages To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/syslogd/syslogd.8 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/syslogd/syslogd.8 diff -u src/usr.sbin/syslogd/syslogd.8:1.48 src/usr.sbin/syslogd/syslogd.8:1.49 --- src/usr.sbin/syslogd/syslogd.8:1.48 Thu Jul 16 13:33:44 2009 +++ src/usr.sbin/syslogd/syslogd.8 Thu Oct 15 20:35:07 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: syslogd.8,v 1.48 2009/07/16 13:33:44 yamt Exp $ +.\ $NetBSD: syslogd.8,v 1.49 2009/10/15 20:35:07 plunky Exp $ .\ .\ Copyright (c) 1983, 1986, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ from: @(#)syslogd.8 8.1 (Berkeley) 6/6/93 .\ -.Dd July 16, 2009 +.Dd October 15, 2009 .Dt SYSLOGD 8 .Os .Sh NAME @@ -235,6 +235,8 @@ format. See RFC 3164 (BSD Syslog) and RFC 5424 (Syslog Protocol) for detailed description of the message format. +Messages from the local kernel that are not tagged with a priority code +receive the default facility .Dv LOG_KERN and priority .Dv LOG_NOTICE .
CVS commit: src/external/gpl3/binutils/dist/binutils
Module Name:src Committed By: thorpej Date: Thu Oct 15 20:35:19 UTC 2009 Modified Files: src/external/gpl3/binutils/dist/binutils: configure Log Message: Regenerate for: Compute the size of off_t and bypass the checks for fopen64() and stat64() if off_t is 64-bit. Otherwise, we get fatal (due to -Werror) warnings on Mac OS X 10.6 because stat64() is deprecated on that host. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/binutils/dist/binutils/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/binutils/configure diff -u src/external/gpl3/binutils/dist/binutils/configure:1.1.1.1 src/external/gpl3/binutils/dist/binutils/configure:1.2 --- src/external/gpl3/binutils/dist/binutils/configure:1.1.1.1 Tue Aug 18 10:13:53 2009 +++ src/external/gpl3/binutils/dist/binutils/configure Thu Oct 15 20:35:19 2009 @@ -12517,7 +12517,436 @@ # Check whether fopen64 is available and whether _LARGEFILE64_SOURCE -# needs to be defined for it +# needs to be defined for it. +# +# If off_t is 64-bit, then we don't need to bother. It's important to +# try and avoid these calls if we can because some platforms that have +# them (e.g. Mac OS X 10.6) mark them as deprecated and they cause +# fatal (due to -Werror) warnings. +echo $as_me:$LINENO: checking for off_t 5 +echo $ECHO_N checking for off_t... $ECHO_C 6 +if test ${ac_cv_type_off_t+set} = set; then + echo $ECHO_N (cached) $ECHO_C 6 +else + cat conftest.$ac_ext _ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h conftest.$ac_ext +cat conftest.$ac_ext _ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo $as_me:$LINENO: \$ac_compile\) 5 + (eval $ac_compile) 2conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 conftest.err + rm -f conftest.er1 + cat conftest.err 5 + echo $as_me:$LINENO: \$? = $ac_status 5 + (exit $ac_status); } + { ac_try='test -z $ac_c_werror_flag + || test ! -s conftest.err' + { (eval echo $as_me:$LINENO: \$ac_try\) 5 + (eval $ac_try) 25 + ac_status=$? + echo $as_me:$LINENO: \$? = $ac_status 5 + (exit $ac_status); }; } + { ac_try='test -s conftest.$ac_objext' + { (eval echo $as_me:$LINENO: \$ac_try\) 5 + (eval $ac_try) 25 + ac_status=$? + echo $as_me:$LINENO: \$? = $ac_status 5 + (exit $ac_status); }; }; then + ac_cv_type_off_t=yes +else + echo $as_me: failed program was: 5 +sed 's/^/| /' conftest.$ac_ext 5 + +ac_cv_type_off_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo $as_me:$LINENO: result: $ac_cv_type_off_t 5 +echo ${ECHO_T}$ac_cv_type_off_t 6 + +echo $as_me:$LINENO: checking size of off_t 5 +echo $ECHO_N checking size of off_t... $ECHO_C 6 +if test ${ac_cv_sizeof_off_t+set} = set; then + echo $ECHO_N (cached) $ECHO_C 6 +else + if test $ac_cv_type_off_t = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) = 0]];'. + # This bug is HP SR number 8606223364. + if test $cross_compiling = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat conftest.$ac_ext _ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h conftest.$ac_ext +cat conftest.$ac_ext _ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (off_t))) = 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo $as_me:$LINENO: \$ac_compile\) 5 + (eval $ac_compile) 2conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 conftest.err + rm -f conftest.er1 + cat conftest.err 5 + echo $as_me:$LINENO: \$? = $ac_status 5 + (exit $ac_status); } + { ac_try='test -z $ac_c_werror_flag + || test ! -s conftest.err' + { (eval echo $as_me:$LINENO: \$ac_try\) 5 + (eval $ac_try) 25 + ac_status=$? + echo $as_me:$LINENO: \$? = $ac_status 5 + (exit $ac_status); }; } + { ac_try='test -s conftest.$ac_objext' + { (eval echo $as_me:$LINENO: \$ac_try\) 5 + (eval $ac_try) 25 + ac_status=$? + echo $as_me:$LINENO: \$? = $ac_status 5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do +cat conftest.$ac_ext _ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h conftest.$ac_ext +cat conftest.$ac_ext _ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (off_t))) = $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo $as_me:$LINENO: \$ac_compile\) 5 + (eval $ac_compile) 2conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 conftest.err + rm -f conftest.er1 + cat conftest.err
CVS commit: src
Module Name:src Committed By: thorpej Date: Thu Oct 15 20:50:13 UTC 2009 Modified Files: src/share/man/man9: pool_cache.9 src/sys/kern: subr_pool.c src/sys/sys: pool.h Log Message: - pool_cache_invalidate(): broadcast a cross-call to drain the per-CPU caches before draining the global cache. - pool_cache_invalidate_local(): remove. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man9/pool_cache.9 cvs rdiff -u -r1.175 -r1.176 src/sys/kern/subr_pool.c cvs rdiff -u -r1.66 -r1.67 src/sys/sys/pool.h 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/man9/pool_cache.9 diff -u src/share/man/man9/pool_cache.9:1.12 src/share/man/man9/pool_cache.9:1.13 --- src/share/man/man9/pool_cache.9:1.12 Thu Oct 8 23:15:26 2009 +++ src/share/man/man9/pool_cache.9 Thu Oct 15 20:50:13 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: pool_cache.9,v 1.12 2009/10/08 23:15:26 wiz Exp $ +.\ $NetBSD: pool_cache.9,v 1.13 2009/10/15 20:50:13 thorpej Exp $ .\ .\ Copyright (c)2003 YAMAMOTO Takashi, .\ All rights reserved. @@ -53,7 +53,7 @@ .\ POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd October 9, 2009 +.Dd October 15, 2009 .Dt POOL_CACHE 9 .Os .\ @@ -67,7 +67,6 @@ .Nm pool_cache_put , .Nm pool_cache_destruct_object , .Nm pool_cache_invalidate , -.Nm pool_cache_invalidate_local , .Nm pool_cache_sethiwat , .Nm pool_cache_setlowat .Nd resource-pool cache manager @@ -108,9 +107,6 @@ .Ft void .Fn pool_cache_invalidate \ pool_cache_t pc -.Ft void -.Fn pool_cache_invalidate_local \ -pool_cache_t pc .\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .Ft void .Fn pool_cache_sethiwat \ @@ -279,22 +275,11 @@ .Pp Invalidate a pool cache .Fa pc . -Destruct and release all objects in the global cache. -Per-CPU caches will not be invalidated by this call, meaning that it -is still possible to allocate stale items from the cache. -If relevant, the user must check for this condition when allocating -items. -.\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.It Fn pool_cache_invalidate_local pc -.Pp -Invalidate local, current CPU pool cache -.Fa pc . -Destruct and release all objects in the local, current CPU cache. -Only the Per-CPU caches associated to the current CPU calling the routine -will be invalidated, meaning that stale items can still be allocated from -other CPUs or the global cache. -It is the caller's responsibility to ensure that such conditions do -not occur. +All objects in the cache will be destructed and freed back to the pool +backing the cache. +For pool caches that vend constructed objects, consumers of this API +must take care to provide proper synchronization between the input to +the constructor and cache invalidation. .\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .It Fn pool_cache_sethiwat pc nitems .Pp Index: src/sys/kern/subr_pool.c diff -u src/sys/kern/subr_pool.c:1.175 src/sys/kern/subr_pool.c:1.176 --- src/sys/kern/subr_pool.c:1.175 Thu Oct 8 21:54:45 2009 +++ src/sys/kern/subr_pool.c Thu Oct 15 20:50:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.175 2009/10/08 21:54:45 jym Exp $ */ +/* $NetBSD: subr_pool.c,v 1.176 2009/10/15 20:50:12 thorpej Exp $ */ /*- * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.175 2009/10/08 21:54:45 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.176 2009/10/15 20:50:12 thorpej Exp $); #include opt_ddb.h #include opt_pool.h @@ -2289,11 +2289,33 @@ * * Invalidate a pool cache (destruct and release all of the * cached objects). Does not reclaim objects from the pool. + * + * Note: For pool caches that provide constructed objects, there + * is an assumption that another level of synchronization is occurring + * between the input to the constructor and the cache invalidation. */ void pool_cache_invalidate(pool_cache_t pc) { pcg_t *full, *empty, *part; + uint64_t where; + + if (ncpu 2) { + /* + * We might be called early enough in the boot process + * for the CPU data structures to not be fully initialized. + * In this case, simply gather the local CPU's cache now + * since it will be the only one running. + */ + pool_cache_xcall(pc); + } else { + /* + * Gather all of the CPU-specific caches into the + * global cache. + */ + where = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, pc, NULL); + xc_wait(where); + } mutex_enter(pc-pc_lock); full = pc-pc_fullgroups; @@ -2313,20 +2335,6 @@ } /* - * pool_cache_invalidate_local: - * - * Invalidate all local ('current CPU') cached objects in - * pool cache. - * It is caller's responsibility to ensure that no operation is - * taking
CVS commit: src
Module Name:src Committed By: jym Date: Thu Oct 15 22:59:12 UTC 2009 Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man9: Makefile Log Message: Remove pool_cache_invalidate_local(9) from the sets, and mark the entries as obsolete. Noted by h...@. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.1329 -r1.1330 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.295 -r1.296 src/share/man/man9/Makefile 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.1329 src/distrib/sets/lists/comp/mi:1.1330 --- src/distrib/sets/lists/comp/mi:1.1329 Wed Oct 14 17:30:50 2009 +++ src/distrib/sets/lists/comp/mi Thu Oct 15 22:59:12 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1329 2009/10/14 17:30:50 pooka Exp $ +# $NetBSD: mi,v 1.1330 2009/10/15 22:59:12 jym Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -9025,7 +9025,7 @@ ./usr/share/man/cat9/pool_cache_get_paddr.0 comp-sys-catman .cat ./usr/share/man/cat9/pool_cache_init.0 comp-sys-catman .cat ./usr/share/man/cat9/pool_cache_invalidate.0 comp-sys-catman .cat -./usr/share/man/cat9/pool_cache_invalidate_local.0 comp-sys-catman .cat +./usr/share/man/cat9/pool_cache_invalidate_local.0 comp-obsolete obsolete ./usr/share/man/cat9/pool_cache_put.0 comp-sys-catman .cat ./usr/share/man/cat9/pool_cache_put_paddr.0 comp-sys-catman .cat ./usr/share/man/cat9/pool_create.0 comp-sys-catman .cat @@ -14437,7 +14437,7 @@ ./usr/share/man/html9/pool_cache_get_paddr.html comp-sys-htmlman html ./usr/share/man/html9/pool_cache_init.html comp-sys-htmlman html ./usr/share/man/html9/pool_cache_invalidate.html comp-sys-htmlman html -./usr/share/man/html9/pool_cache_invalidate_local.html comp-sys-htmlman html +./usr/share/man/html9/pool_cache_invalidate_local.html comp-obsolete obsolete ./usr/share/man/html9/pool_cache_put.html comp-sys-htmlman html ./usr/share/man/html9/pool_cache_put_paddr.html comp-sys-htmlman html ./usr/share/man/html9/pool_create.html comp-sys-htmlman html @@ -20018,7 +20018,7 @@ ./usr/share/man/man9/pool_cache_get_paddr.9 comp-sys-man .man ./usr/share/man/man9/pool_cache_init.9 comp-sys-man .man ./usr/share/man/man9/pool_cache_invalidate.9 comp-sys-man .man -./usr/share/man/man9/pool_cache_invalidate_local.9 comp-sys-man.man +./usr/share/man/man9/pool_cache_invalidate_local.9 comp-obsolete obsolete ./usr/share/man/man9/pool_cache_put.9 comp-sys-man .man ./usr/share/man/man9/pool_cache_put_paddr.9 comp-sys-man .man ./usr/share/man/man9/pool_create.9 comp-sys-man .man Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.295 src/share/man/man9/Makefile:1.296 --- src/share/man/man9/Makefile:1.295 Thu Oct 8 21:54:45 2009 +++ src/share/man/man9/Makefile Thu Oct 15 22:59:12 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.295 2009/10/08 21:54:45 jym Exp $ +# $NetBSD: Makefile,v 1.296 2009/10/15 22:59:12 jym Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -543,8 +543,7 @@ pool_cache.9 pool_cache_put_paddr.9 \ pool_cache.9 pool_cache_put.9 \ pool_cache.9 pool_cache_destruct_object.9 \ - pool_cache.9 pool_cache_invalidate.9 \ - pool_cache.9 pool_cache_invalidate_local.9 + pool_cache.9 pool_cache_invalidate.9 MLINKS+=powerhook_establish.9 powerhook_disestablish.9 MLINKS+=preempt.9 yield.9 MLINKS+=ras.9 ras_lookup.9 \
CVS commit: src/usr.sbin/user
Module Name:src Committed By: hubertf Date: Thu Oct 15 23:03:02 UTC 2009 Modified Files: src/usr.sbin/user: user.c Log Message: Fix -p: * rm_eo is the first character *after* the match, so no need for a +1 * Blowfish hashes are only 53 chars long, not 54 To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/usr.sbin/user/user.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/user/user.c diff -u src/usr.sbin/user/user.c:1.123 src/usr.sbin/user/user.c:1.124 --- src/usr.sbin/user/user.c:1.123 Fri Mar 20 02:53:47 2009 +++ src/usr.sbin/user/user.c Thu Oct 15 23:03:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: user.c,v 1.123 2009/03/20 02:53:47 mike Exp $ */ +/* $NetBSD: user.c,v 1.124 2009/10/15 23:03:02 hubertf Exp $ */ /* * Copyright (c) 1999 Alistair G. Crooks. All rights reserved. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1999\ The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: user.c,v 1.123 2009/03/20 02:53:47 mike Exp $); +__RCSID($NetBSD: user.c,v 1.124 2009/10/15 23:03:02 hubertf Exp $); #endif #include sys/types.h @@ -908,7 +908,7 @@ static passwd_type_t passwd_types[] = { { $sha1, 5, 28, \\$[^$]+\\$[^$]+\\$[^$]+\\$(.*), 1 }, /* SHA1 */ - { $2a, 3, 54, \\$[^$]+\\$[^$]+\\$(.*), 1 }, /* Blowfish */ + { $2a, 3, 53, \\$[^$]+\\$[^$]+\\$(.*), 1 }, /* Blowfish */ { $1, 2, 34, NULL,0 }, /* MD5 */ { , 0, DES_Len,NULL,0 }, /* standard DES */ { NULL, (size_t)~0, (size_t)~0, NULL, 0 } @@ -932,7 +932,7 @@ if (regexec(r, newpasswd, 10, matchv, 0) == 0) { regfree(r); return (int)(matchv[pwtp-re_sub].rm_eo - -matchv[pwtp-re_sub].rm_so + 1) == +matchv[pwtp-re_sub].rm_so) == pwtp-length; } regfree(r);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Oct 15 23:15:56 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: locks.c rump_private.h scheduler.c Log Message: When allocating the temporary lwp we must have an lwp context. So take turns using lwp0 for this purpose, nothing else uses it. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/rump/librump/rumpkern/locks.c cvs rdiff -u -r1.32 -r1.33 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpkern/scheduler.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/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.30 src/sys/rump/librump/rumpkern/locks.c:1.31 --- src/sys/rump/librump/rumpkern/locks.c:1.30 Thu Oct 15 16:39:22 2009 +++ src/sys/rump/librump/rumpkern/locks.c Thu Oct 15 23:15:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.30 2009/10/15 16:39:22 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.31 2009/10/15 23:15:55 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.30 2009/10/15 16:39:22 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.31 2009/10/15 23:15:55 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -347,7 +347,7 @@ rump_unschedule_cpu(l); rumpuser_mutex_enter_nowrap(rump_giantlock); - rump_schedule_cpu(l); + l-l_cpu = rump_schedule_cpu(); } lockcnt++; } @@ -391,7 +391,7 @@ rump_user_schedule(int nlocks) { - rump_schedule_cpu(curlwp); + curlwp-l_cpu = rump_schedule_cpu(); if (nlocks) _kernel_lock(nlocks); Index: src/sys/rump/librump/rumpkern/rump_private.h diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.32 src/sys/rump/librump/rumpkern/rump_private.h:1.33 --- src/sys/rump/librump/rumpkern/rump_private.h:1.32 Thu Oct 15 16:39:22 2009 +++ src/sys/rump/librump/rumpkern/rump_private.h Thu Oct 15 23:15:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_private.h,v 1.32 2009/10/15 16:39:22 pooka Exp $ */ +/* $NetBSD: rump_private.h,v 1.33 2009/10/15 23:15:55 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -86,11 +86,11 @@ int rump_sysproxy_copyout(const void *, void *, size_t); int rump_sysproxy_copyin(const void *, void *, size_t); -void rump_scheduler_init(void); -void rump_schedule(void); -void rump_unschedule(void); -void rump_schedule_cpu(struct lwp *); -void rump_unschedule_cpu(struct lwp *); +void rump_scheduler_init(void); +void rump_schedule(void); +void rump_unschedule(void); +struct cpu_info *rump_schedule_cpu(void); +void rump_unschedule_cpu(struct lwp *); void rump_user_schedule(int); void rump_user_unschedule(int, int *); Index: src/sys/rump/librump/rumpkern/scheduler.c diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.2 src/sys/rump/librump/rumpkern/scheduler.c:1.3 --- src/sys/rump/librump/rumpkern/scheduler.c:1.2 Thu Oct 15 16:39:22 2009 +++ src/sys/rump/librump/rumpkern/scheduler.c Thu Oct 15 23:15:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: scheduler.c,v 1.2 2009/10/15 16:39:22 pooka Exp $ */ +/* $NetBSD: scheduler.c,v 1.3 2009/10/15 23:15:55 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.2 2009/10/15 16:39:22 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.3 2009/10/15 23:15:55 pooka Exp $); #include sys/param.h #include sys/cpu.h @@ -53,7 +53,9 @@ static SLIST_HEAD(,rumpcpu) cpu_freelist = SLIST_HEAD_INITIALIZER(cpu_freelist); static struct rumpuser_mtx *schedmtx; -static struct rumpuser_cv *schedcv; +static struct rumpuser_cv *schedcv, *lwp0cv; + +static bool lwp0busy = false; struct cpu_info * cpu_lookup(u_int index) @@ -71,6 +73,7 @@ rumpuser_mutex_init(schedmtx); rumpuser_cv_init(schedcv); + rumpuser_cv_init(lwp0cv); for (i = 0; i ncpu; i++) { rcpu = rcpu_storage[i]; ci = rump_cpus[i]; @@ -83,32 +86,57 @@ void rump_schedule() { - struct lwp *l = rumpuser_get_curlwp(); + struct cpu_info *ci; + struct lwp *l; /* * If there is no dedicated lwp, allocate a temp one and - * set it to be free'd upon unschedule(). + * set it to be free'd upon unschedule(). Use lwp0 context + * for reserving the necessary resources. */ + l = rumpuser_get_curlwp(); if (l == NULL) { + /* busy lwp0 */ + rumpuser_mutex_enter_nowrap(schedmtx); + while (lwp0busy) + rumpuser_cv_wait_nowrap(lwp0cv, schedmtx); + lwp0busy = true; + rumpuser_mutex_exit(schedmtx); + + /* schedule cpu and use lwp0 */ + ci = rump_schedule_cpu(); + lwp0.l_cpu = ci; + rumpuser_set_curlwp(lwp0); l = rump_lwp_alloc(0, rump_nextlid()); - rumpuser_set_curlwp(l); + + /* release lwp0 */ + rump_lwp_switch(l); + rumpuser_mutex_enter_nowrap(schedmtx); + lwp0busy = false; +
CVS commit: src/sys/rump/librump/rumpkern/arch/alpha
Module Name:src Committed By: pooka Date: Thu Oct 15 23:42:40 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern/arch/alpha: Makefile.inc Log Message: include rumpcpu_generic To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/sys/rump/librump/rumpkern/arch/alpha/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/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc diff -u src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc:1.1 src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc:1.2 --- src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc:1.1 Tue Jan 6 17:04:01 2009 +++ src/sys/rump/librump/rumpkern/arch/alpha/Makefile.inc Thu Oct 15 23:42:40 2009 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.1 2009/01/06 17:04:01 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.2 2009/10/15 23:42:40 pooka Exp $ # # some stubs SRCS+= rumpcrud.c .PATH: ${RUMPTOP}/../arch/alpha/alpha -SRCS+= kobj_machdep.c +SRCS+= kobj_machdep.c rumpcpu_generic.c
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Oct 16 00:14:53 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c locks.c rump.c rump_private.h scheduler.c sleepq.c vm.c Log Message: Include sys_select.c for proper select()/poll() support. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.102 -r1.103 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.31 -r1.32 src/sys/rump/librump/rumpkern/locks.c cvs rdiff -u -r1.125 -r1.126 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.33 -r1.34 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/scheduler.c cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpkern/sleepq.c cvs rdiff -u -r1.61 -r1.62 src/sys/rump/librump/rumpkern/vm.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/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.52 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.53 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.52 Thu Oct 15 00:28:46 2009 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Fri Oct 16 00:14:53 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.52 2009/10/15 00:28:46 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.53 2009/10/16 00:14:53 pooka Exp $ # .include ${RUMPTOP}/Makefile.rump @@ -34,7 +34,7 @@ SRCS+= init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c \ kern_ksyms.c kern_malloc_stdtype.c kern_module.c kern_rate.c \ kern_stub.c kern_sysctl.c kern_timeout.c kern_uidinfo.c param.c \ - sys_descrip.c sys_generic.c syscalls.c + sys_descrip.c sys_generic.c sys_select.c syscalls.c # sys/kern subr (misc) SRCS+= subr_devsw.c subr_callback.c subr_evcnt.c subr_extent.c \ Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.102 src/sys/rump/librump/rumpkern/emul.c:1.103 --- src/sys/rump/librump/rumpkern/emul.c:1.102 Thu Oct 15 16:39:22 2009 +++ src/sys/rump/librump/rumpkern/emul.c Fri Oct 16 00:14:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.102 2009/10/15 16:39:22 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.103 2009/10/16 00:14:53 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.102 2009/10/15 16:39:22 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.103 2009/10/16 00:14:53 pooka Exp $); #include sys/param.h #include sys/malloc.h @@ -93,7 +93,6 @@ const char *domainname; int domainnamelen; -const struct filterops seltrue_filtops; const struct filterops sig_filtops; #define DEVSW_SIZE 255 @@ -487,7 +486,7 @@ case SIGSYS: break; default: - panic(unhandled signal %d, signo); + panic(unhandled signal %d\n, signo); } } @@ -577,32 +576,6 @@ return t; } -int -seltrue(dev_t dev, int events, struct lwp *l) -{ -return (events (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); -} - -void -selrecord(lwp_t *selector, struct selinfo *sip) -{ -} - -void -selinit(struct selinfo *sip) -{ -} - -void -selnotify(struct selinfo *sip, int events, long knhint) -{ -} - -void -seldestroy(struct selinfo *sip) -{ -} - const char * device_xname(device_t dv) { @@ -741,39 +714,6 @@ rumpuser_exit(0); } -/* - * XXX: from sys_select.c, see that file for license. - * (these will go away really soon in favour of the real sys_select.c) - * ((really, the select code just needs cleanup)) - * (((seriously))) - */ -int -inittimeleft(struct timespec *ts, struct timespec *sleepts) -{ - if (itimespecfix(ts)) - return -1; - getnanouptime(sleepts); - return 0; -} - -int -gettimeleft(struct timespec *ts, struct timespec *sleepts) -{ - /* - * We have to recalculate the timeout on every retry. - */ - struct timespec sleptts; - /* - * reduce ts by elapsed time - * based on monotonic time scale - */ - getnanouptime(sleptts); - timespecadd(ts, sleepts, ts); - timespecsub(ts, sleptts, ts); - *sleepts = sleptts; - return tstohz(ts); -} - bool pmf_device_register1(struct device *dev, bool (*suspend)(device_t PMF_FN_PROTO), Index: src/sys/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.31 src/sys/rump/librump/rumpkern/locks.c:1.32 --- src/sys/rump/librump/rumpkern/locks.c:1.31 Thu Oct 15 23:15:55 2009 +++ src/sys/rump/librump/rumpkern/locks.c Fri Oct 16 00:14:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.31 2009/10/15 23:15:55 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.32 2009/10/16 00:14:53 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.31 2009/10/15 23:15:55 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.32 2009/10/16 00:14:53 pooka Exp $); #include sys/param.h
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: pooka Date: Fri Oct 16 00:16:32 UTC 2009 Modified Files: src/sys/rump/librump/rumpnet: Makefile.rumpnet Removed Files: src/sys/rump/librump/rumpnet: net_emul.c Log Message: We have real pollsuck() now, so remove this, ahem, less-than-perfect one. (XXX: only thing in the kernel using pollsuck is netsmb) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpnet/Makefile.rumpnet cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rumpnet/net_emul.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/rump/librump/rumpnet/Makefile.rumpnet diff -u src/sys/rump/librump/rumpnet/Makefile.rumpnet:1.8 src/sys/rump/librump/rumpnet/Makefile.rumpnet:1.9 --- src/sys/rump/librump/rumpnet/Makefile.rumpnet:1.8 Wed Oct 14 17:29:20 2009 +++ src/sys/rump/librump/rumpnet/Makefile.rumpnet Fri Oct 16 00:16:32 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpnet,v 1.8 2009/10/14 17:29:20 pooka Exp $ +# $NetBSD: Makefile.rumpnet,v 1.9 2009/10/16 00:16:32 pooka Exp $ # .include ${RUMPTOP}/Makefile.rump @@ -10,7 +10,7 @@ ${RUMPTOP}/../net \ ${RUMPTOP}/../compat/common -SRCS= net_stub.c netisr.c rump_net.c net_emul.c +SRCS= net_stub.c netisr.c rump_net.c SRCS+= rumpnet_if_wrappers.c
CVS commit: src/sys/kern
Module Name:src Committed By: jnemeth Date: Fri Oct 16 00:27:07 UTC 2009 Modified Files: src/sys/kern: kern_module.c sys_module.c Log Message: allow passing a NULL proplib dictionary to modctl(MODCTL_LOAD, ...) To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/kern/kern_module.c cvs rdiff -u -r1.9 -r1.10 src/sys/kern/sys_module.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/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.51 src/sys/kern/kern_module.c:1.52 --- src/sys/kern/kern_module.c:1.51 Sat Oct 3 00:06:37 2009 +++ src/sys/kern/kern_module.c Fri Oct 16 00:27:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.51 2009/10/03 00:06:37 elad Exp $ */ +/* $NetBSD: kern_module.c,v 1.52 2009/10/16 00:27:07 jnemeth Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.51 2009/10/03 00:06:37 elad Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_module.c,v 1.52 2009/10/16 00:27:07 jnemeth Exp $); #ifdef _KERNEL_OPT #include opt_ddb.h @@ -1252,6 +1252,10 @@ const char *props_key; bool error; + if (new_dict == NULL) { /* nothing to merge */ + return true; + } + error = false; props_iter = prop_dictionary_iterator(new_dict); if (props_iter == NULL) { Index: src/sys/kern/sys_module.c diff -u src/sys/kern/sys_module.c:1.9 src/sys/kern/sys_module.c:1.10 --- src/sys/kern/sys_module.c:1.9 Tue Apr 28 17:57:00 2009 +++ src/sys/kern/sys_module.c Fri Oct 16 00:27:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_module.c,v 1.9 2009/04/28 17:57:00 skrll Exp $ */ +/* $NetBSD: sys_module.c,v 1.10 2009/10/16 00:27:07 jnemeth Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_module.c,v 1.9 2009/04/28 17:57:00 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_module.c,v 1.10 2009/10/16 00:27:07 jnemeth Exp $); #include sys/param.h #include sys/systm.h @@ -63,29 +63,38 @@ if (error != 0) goto out2; - propslen = ml-ml_propslen + 1; - props = (char *)kmem_alloc(propslen, KM_SLEEP); - if (props == NULL) { - error = ENOMEM; - goto out2; - } + if (ml-ml_props != NULL) { + propslen = ml-ml_propslen + 1; + props = (char *)kmem_alloc(propslen, KM_SLEEP); + if (props == NULL) { + error = ENOMEM; + goto out2; + } - error = copyinstr(ml-ml_props, props, propslen, NULL); - if (error != 0) - goto out3; + error = copyinstr(ml-ml_props, props, propslen, NULL); + if (error != 0) + goto out3; - dict = prop_dictionary_internalize(props); - if (dict == NULL) { - error = EINVAL; - goto out3; + dict = prop_dictionary_internalize(props); + if (dict == NULL) { + error = EINVAL; + goto out3; + } + } else { + dict = NULL; + props = NULL; } error = module_load(path, ml-ml_flags, dict, MODULE_CLASS_ANY); - prop_object_release(dict); + if (dict != NULL) { + prop_object_release(dict); + } out3: - kmem_free(props, propslen); + if (props != NULL) { + kmem_free(props, propslen); + } out2: PNBUF_PUT(path); out1:
CVS commit: src/sys/dev/usb
Module Name:src Committed By: enami Date: Fri Oct 16 00:45:26 UTC 2009 Modified Files: src/sys/dev/usb: ohci.c Log Message: Since the aprint_normal_dev() several lines above prints a space after the device name, no need to prepend the space here. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/sys/dev/usb/ohci.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/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.199 src/sys/dev/usb/ohci.c:1.200 --- src/sys/dev/usb/ohci.c:1.199 Tue Sep 1 21:46:07 2009 +++ src/sys/dev/usb/ohci.c Fri Oct 16 00:45:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.199 2009/09/01 21:46:07 jmcneill Exp $ */ +/* $NetBSD: ohci.c,v 1.200 2009/10/16 00:45:26 enami Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.199 2009/09/01 21:46:07 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.200 2009/10/16 00:45:26 enami Exp $); #include sys/param.h #include sys/systm.h @@ -701,7 +701,7 @@ SIMPLEQ_INIT(sc-sc_free_xfers); rev = OREAD4(sc, OHCI_REVISION); - aprint_normal( OHCI version %d.%d%s\n, + aprint_normal(OHCI version %d.%d%s\n, OHCI_REV_HI(rev), OHCI_REV_LO(rev), OHCI_REV_LEGACY(rev) ? , legacy support : );
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Oct 16 02:13:54 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: sleepq.c Log Message: In case of timeout, remember to remove ourselves from the sleep staleq. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/sleepq.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/rump/librump/rumpkern/sleepq.c diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.3 src/sys/rump/librump/rumpkern/sleepq.c:1.4 --- src/sys/rump/librump/rumpkern/sleepq.c:1.3 Fri Oct 16 00:14:53 2009 +++ src/sys/rump/librump/rumpkern/sleepq.c Fri Oct 16 02:13:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.c,v 1.3 2009/10/16 00:14:53 pooka Exp $ */ +/* $NetBSD: sleepq.c,v 1.4 2009/10/16 02:13:54 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sleepq.c,v 1.3 2009/10/16 00:14:53 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: sleepq.c,v 1.4 2009/10/16 02:13:54 pooka Exp $); #include sys/param.h #include sys/condvar.h @@ -74,8 +74,10 @@ int biglocks = l-l_biglocks; while (l-l_wchan) { - if ((error=cv_timedwait(sq_cv, mp, timo)) == EWOULDBLOCK) + if ((error=cv_timedwait(sq_cv, mp, timo)) == EWOULDBLOCK) { + TAILQ_REMOVE(l-l_sleepq, l, l_sleepchain); l-l_wchan = NULL; + } } mutex_spin_exit(mp);
CVS commit: [netbsd-5] src
Module Name:src Committed By: snj Date: Fri Oct 16 05:43:38 UTC 2009 Modified Files: src/share/man/man4 [netbsd-5]: audio.4 src/sys/dev [netbsd-5]: audio.c audio_if.h src/sys/dev/pci/hdaudio [netbsd-5]: hdaudio_afg.c src/sys/sys [netbsd-5]: audioio.h Log Message: Pull up following revision(s) (requested by sborrill in ticket #1038): share/man/man4/audio.4: revision 1.70 via patch sys/dev/audio.c: revision 1.248 sys/dev/audio_if.h: revision 1.66 sys/dev/pci/hdaudio/hdaudio_afg.c: revision 1.16 sys/sys/audioio.h: revision 1.33 Add support for playback- or capture-only devices. Fixes PR 42050 To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.68.4.1 src/share/man/man4/audio.4 cvs rdiff -u -r1.243.6.2 -r1.243.6.3 src/sys/dev/audio.c cvs rdiff -u -r1.65 -r1.65.14.1 src/sys/dev/audio_if.h cvs rdiff -u -r1.14.2.3 -r1.14.2.4 src/sys/dev/pci/hdaudio/hdaudio_afg.c cvs rdiff -u -r1.32 -r1.32.44.1 src/sys/sys/audioio.h 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/audio.4 diff -u src/share/man/man4/audio.4:1.68 src/share/man/man4/audio.4:1.68.4.1 --- src/share/man/man4/audio.4:1.68 Wed Apr 30 13:10:53 2008 +++ src/share/man/man4/audio.4 Fri Oct 16 05:43:37 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: audio.4,v 1.68 2008/04/30 13:10:53 martin Exp $ +.\ $NetBSD: audio.4,v 1.68.4.1 2009/10/16 05:43:37 snj Exp $ .\ .\ Copyright (c) 1996 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd June 11, 2007 +.Dd September 29, 2009 .Dt AUDIO 4 .Os .Sh NAME @@ -243,6 +243,10 @@ .It Dv AUDIO_PROP_INDEPENDENT the device can set the playing and recording encoding parameters independently. +.It Dv AUDIO_PROP_PLAYBACK +the device is capable of audio playback. +.It Dv AUDIO_PROP_CAPTURE +the device is capable of audio capture. .El .It Dv AUDIO_GETIOFFS (audio_offset_t) .It Dv AUDIO_GETOOFFS (audio_offset_t) Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.243.6.2 src/sys/dev/audio.c:1.243.6.3 --- src/sys/dev/audio.c:1.243.6.2 Tue Sep 29 22:50:11 2009 +++ src/sys/dev/audio.c Fri Oct 16 05:43:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.243.6.2 2009/09/29 22:50:11 snj Exp $ */ +/* $NetBSD: audio.c,v 1.243.6.3 2009/10/16 05:43:37 snj Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243.6.2 2009/09/29 22:50:11 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243.6.3 2009/10/16 05:43:37 snj Exp $); #include audio.h #if NAUDIO 0 @@ -192,6 +192,10 @@ static void audio_mixer_capture(struct audio_softc *); static void audio_mixer_restore(struct audio_softc *); +static int audio_get_props(struct audio_softc *); +static bool audio_can_playback(struct audio_softc *); +static bool audio_can_capture(struct audio_softc *); + static void audio_softintr_rd(void *); static void audio_softintr_wr(void *); @@ -314,41 +318,51 @@ } #endif - props = hwp-get_props(hdlp); + sc-hw_if = hwp; + sc-hw_hdl = hdlp; + sc-sc_dev = parent; + sc-sc_opencnt = 0; + sc-sc_writing = sc-sc_waitcomp = 0; + sc-sc_lastinfovalid = false; - aprint_naive(\n); + props = audio_get_props(sc); if (props AUDIO_PROP_FULLDUPLEX) aprint_normal(: full duplex); else aprint_normal(: half duplex); + if (props AUDIO_PROP_PLAYBACK) + aprint_normal(, playback); + if (props AUDIO_PROP_CAPTURE) + aprint_normal(, capture); if (props AUDIO_PROP_MMAP) aprint_normal(, mmap); if (props AUDIO_PROP_INDEPENDENT) aprint_normal(, independent); + aprint_naive(\n); aprint_normal(\n); - sc-hw_if = hwp; - sc-hw_hdl = hdlp; - sc-sc_dev = parent; - sc-sc_opencnt = 0; - sc-sc_writing = sc-sc_waitcomp = 0; - sc-sc_lastinfovalid = false; - - error = audio_alloc_ring(sc, sc-sc_pr, AUMODE_PLAY, AU_RING_SIZE); - if (error) { - sc-hw_if = NULL; - aprint_error(audio: could not allocate play buffer\n); - return; + if (audio_can_playback(sc)) { + error = audio_alloc_ring(sc, sc-sc_pr, + AUMODE_PLAY, AU_RING_SIZE); + if (error) { + sc-hw_if = NULL; + aprint_error(audio: could not allocate play buffer\n); + return; + } } - error = audio_alloc_ring(sc, sc-sc_rr, AUMODE_RECORD, AU_RING_SIZE); - if (error) { - audio_free_ring(sc, sc-sc_pr); - sc-hw_if = NULL; - aprint_error(audio: could not allocate record buffer\n); - return; + if (audio_can_capture(sc)) { + error = audio_alloc_ring(sc, sc-sc_rr, + AUMODE_RECORD, AU_RING_SIZE); + if (error) { + if (sc-sc_pr.s.start != 0) +audio_free_ring(sc, sc-sc_pr); + sc-hw_if = NULL; + aprint_error(audio: could not allocate record buffer\n); + return; + } } sc-sc_lastgain = 128; @@ -741,6 +755,8 @@ void
CVS commit: [netbsd-5] src/sys/ufs/ext2fs
Module Name:src Committed By: snj Date: Fri Oct 16 05:48:49 UTC 2009 Modified Files: src/sys/ufs/ext2fs [netbsd-5]: ext2fs_vfsops.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1060): sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.146 Pull a fix for mount function from ffs_vfsops.c rev1.186: Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality instead of just vnode pointers. Fixes erroneous does not match mounted device errors from mount(8) in the presence of MFS /dev, init.root, c. To generate a diff of this commit: cvs rdiff -u -r1.137.6.1 -r1.137.6.2 src/sys/ufs/ext2fs/ext2fs_vfsops.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/ext2fs/ext2fs_vfsops.c diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.1 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.2 --- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.1 Sat Nov 29 23:10:19 2008 +++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Oct 16 05:48:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.1 2008/11/29 23:10:19 snj Exp $ */ +/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.2 2009/10/16 05:48:48 snj Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1994 @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ext2fs_vfsops.c,v 1.137.6.1 2008/11/29 23:10:19 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: ext2fs_vfsops.c,v 1.137.6.2 2009/10/16 05:48:48 snj Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -362,8 +362,15 @@ * used for our initial mount */ ump = VFSTOUFS(mp); - if (devvp != ump-um_devvp) -error = EINVAL; + if (devvp != ump-um_devvp) { +if (devvp-v_rdev != ump-um_devvp-v_rdev) + error = EINVAL; +else { + vrele(devvp); + devvp = ump-um_devvp; + vref(devvp); +} + } } } else { if (!update) {
CVS commit: [netbsd-5] src/sys/ufs/ext2fs
Module Name:src Committed By: snj Date: Fri Oct 16 05:50:05 UTC 2009 Modified Files: src/sys/ufs/ext2fs [netbsd-5]: ext2fs_vfsops.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1060): sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.147 Pull a fix from ffs_vfsops.c rev 1.248: Fix bug introduced in revision 1.174(*) where a NULL fspec with an MNT_UPDATE command would always return EINVAL. This broke fsck on root, where fsck'ing a dirty root would always return an error causing rc to resort in a reboot. (*) This is Apply the NFS exports list rototill patch change in ext2fs_vfsops.c rev 1.91. To generate a diff of this commit: cvs rdiff -u -r1.137.6.2 -r1.137.6.3 src/sys/ufs/ext2fs/ext2fs_vfsops.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/ext2fs/ext2fs_vfsops.c diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.2 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.3 --- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.2 Fri Oct 16 05:48:48 2009 +++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Oct 16 05:50:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.2 2009/10/16 05:48:48 snj Exp $ */ +/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.3 2009/10/16 05:50:05 snj Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1994 @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ext2fs_vfsops.c,v 1.137.6.2 2009/10/16 05:48:48 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: ext2fs_vfsops.c,v 1.137.6.3 2009/10/16 05:50:05 snj Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -475,7 +475,7 @@ fs-e2fs_fmod = 1; } if (args-fspec == NULL) - return EINVAL; + return 0; } error = set_statvfs_info(path, UIO_USERSPACE, args-fspec,