CVS commit: src/usr.sbin/arp
Module Name:src Committed By: dholland Date: Thu Jun 10 06:03:20 UTC 2010 Modified Files: src/usr.sbin/arp: arp.c Log Message: Allow -f -, as per PR 10898. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/arp/arp.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/arp/arp.c diff -u src/usr.sbin/arp/arp.c:1.48 src/usr.sbin/arp/arp.c:1.49 --- src/usr.sbin/arp/arp.c:1.48 Thu Apr 2 21:02:06 2009 +++ src/usr.sbin/arp/arp.c Thu Jun 10 06:03:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: arp.c,v 1.48 2009/04/02 21:02:06 christos Exp $ */ +/* $NetBSD: arp.c,v 1.49 2010/06/10 06:03:20 dholland Exp $ */ /* * Copyright (c) 1984, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)arp.c 8.3 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: arp.c,v 1.48 2009/04/02 21:02:06 christos Exp $); +__RCSID($NetBSD: arp.c,v 1.49 2010/06/10 06:03:20 dholland Exp $); #endif #endif /* not lint */ @@ -195,8 +195,14 @@ int i, retval; FILE *fp; - if ((fp = fopen(name, r)) == NULL) - err(1, cannot open %s, name); + if (!strcmp(name, -)) { + fp = stdin; + } else { + fp = fopen(name, r); + if (fp == NULL) { + err(1, Cannot open %s, name); + } + } retval = 0; for (; (line = fparseln(fp, NULL, NULL, NULL, 0)) != NULL; free(line)) { char **ap, *inputstring; @@ -216,7 +222,8 @@ if (set(i, argv)) retval = 1; } - (void)fclose(fp); + if (fp != stdin) + (void)fclose(fp); return retval; }
CVS commit: src/usr.sbin/sa
Module Name:src Committed By: dholland Date: Thu Jun 10 06:09:10 UTC 2010 Modified Files: src/usr.sbin/sa: extern.h main.c pdb.c usrdb.c Log Message: de-__P() To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sa/extern.h cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sa/main.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sa/pdb.c cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/sa/usrdb.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/sa/extern.h diff -u src/usr.sbin/sa/extern.h:1.7 src/usr.sbin/sa/extern.h:1.8 --- src/usr.sbin/sa/extern.h:1.7 Wed Nov 12 13:31:07 2003 +++ src/usr.sbin/sa/extern.h Thu Jun 10 06:09:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.7 2003/11/12 13:31:07 grant Exp $ */ +/* $NetBSD: extern.h,v 1.8 2010/06/10 06:09:10 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -64,25 +64,25 @@ /* typedefs */ -typedef int (*cmpf_t) __P((const DBT *, const DBT *)); +typedef int (*cmpf_t)(const DBT *, const DBT *); /* external functions in sa.c */ -int main __P((int, char **)); -const char *fmt __P((const DBT *)); +int main(int argc, char **argv); +const char *fmt(const DBT *); /* external functions in pdb.c */ -int pacct_init __P((void)); -void pacct_destroy __P((void)); -int pacct_add __P((const struct cmdinfo *)); -int pacct_update __P((void)); -void pacct_print __P((void)); +int pacct_init(void); +void pacct_destroy(void); +int pacct_add(const struct cmdinfo *); +int pacct_update(void); +void pacct_print(void); /* external functions in usrdb.c */ -int usracct_init __P((void)); -void usracct_destroy __P((void)); -int usracct_add __P((const struct cmdinfo *)); -int usracct_update __P((void)); -void usracct_print __P((void)); +int usracct_init(void); +void usracct_destroy(void); +int usracct_add(const struct cmdinfo *); +int usracct_update(void); +void usracct_print(void); /* variables */ Index: src/usr.sbin/sa/main.c diff -u src/usr.sbin/sa/main.c:1.25 src/usr.sbin/sa/main.c:1.26 --- src/usr.sbin/sa/main.c:1.25 Tue Nov 17 18:37:45 2009 +++ src/usr.sbin/sa/main.c Thu Jun 10 06:09:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.25 2009/11/17 18:37:45 drochner Exp $ */ +/* $NetBSD: main.c,v 1.26 2010/06/10 06:09:10 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1994\ Christopher G. Demetriou. All rights reserved.); -__RCSID($NetBSD: main.c,v 1.25 2009/11/17 18:37:45 drochner Exp $); +__RCSID($NetBSD: main.c,v 1.26 2010/06/10 06:09:10 dholland Exp $); #endif /* @@ -60,17 +60,17 @@ #include extern.h #include pathnames.h -static int acct_load __P((char *, int)); -static u_quad_t decode_comp_t __P((comp_t)); -static int cmp_comm __P((const char *, const char *)); -static int cmp_usrsys __P((const DBT *, const DBT *)); -static int cmp_avgusrsys __P((const DBT *, const DBT *)); -static int cmp_dkio __P((const DBT *, const DBT *)); -static int cmp_avgdkio __P((const DBT *, const DBT *)); -static int cmp_cpumem __P((const DBT *, const DBT *)); -static int cmp_avgcpumem __P((const DBT *, const DBT *)); -static int cmp_calls __P((const DBT *, const DBT *)); -static void usage __P((void)) __dead; +static int acct_load(char *, int); +static u_quad_t decode_comp_t(comp_t); +static int cmp_comm(const char *, const char *); +static int cmp_usrsys(const DBT *, const DBT *); +static int cmp_avgusrsys(const DBT *, const DBT *); +static int cmp_dkio(const DBT *, const DBT *); +static int cmp_avgdkio(const DBT *, const DBT *); +static int cmp_cpumem(const DBT *, const DBT *); +static int cmp_avgcpumem(const DBT *, const DBT *); +static int cmp_calls(const DBT *, const DBT *); +static void usage(void) __dead; int aflag, bflag, cflag, dflag, Dflag, fflag, iflag, jflag, kflag; int Kflag, lflag, mflag, qflag, rflag, sflag, tflag, uflag, vflag; Index: src/usr.sbin/sa/pdb.c diff -u src/usr.sbin/sa/pdb.c:1.13 src/usr.sbin/sa/pdb.c:1.14 --- src/usr.sbin/sa/pdb.c:1.13 Sat Apr 18 13:37:04 2009 +++ src/usr.sbin/sa/pdb.c Thu Jun 10 06:09:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pdb.c,v 1.13 2009/04/18 13:37:04 lukem Exp $ */ +/* $NetBSD: pdb.c,v 1.14 2010/06/10 06:09:10 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pdb.c,v 1.13 2009/04/18 13:37:04 lukem Exp $); +__RCSID($NetBSD: pdb.c,v 1.14 2010/06/10 06:09:10 dholland Exp $); #endif #include sys/types.h @@ -49,9 +49,9 @@ #include extern.h #include pathnames.h -static int check_junk __P((struct cmdinfo *)); -static void add_ci __P((const struct cmdinfo *, struct cmdinfo *)); -static void print_ci __P((const struct cmdinfo *, const struct cmdinfo *)); +static int check_junk(struct cmdinfo *); +static void add_ci(const struct cmdinfo *, struct cmdinfo *); +static void print_ci(const struct cmdinfo *,
CVS commit: src/usr.sbin/sa
Module Name:src Committed By: dholland Date: Thu Jun 10 06:17:21 UTC 2010 Modified Files: src/usr.sbin/sa: extern.h main.c pdb.c usrdb.c Log Message: ANSIfy function declarations To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sa/extern.h cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sa/main.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sa/pdb.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sa/usrdb.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/sa/extern.h diff -u src/usr.sbin/sa/extern.h:1.8 src/usr.sbin/sa/extern.h:1.9 --- src/usr.sbin/sa/extern.h:1.8 Thu Jun 10 06:09:10 2010 +++ src/usr.sbin/sa/extern.h Thu Jun 10 06:17:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.8 2010/06/10 06:09:10 dholland Exp $ */ +/* $NetBSD: extern.h,v 1.9 2010/06/10 06:17:21 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -67,7 +67,6 @@ typedef int (*cmpf_t)(const DBT *, const DBT *); /* external functions in sa.c */ -int main(int argc, char **argv); const char *fmt(const DBT *); /* external functions in pdb.c */ Index: src/usr.sbin/sa/main.c diff -u src/usr.sbin/sa/main.c:1.26 src/usr.sbin/sa/main.c:1.27 --- src/usr.sbin/sa/main.c:1.26 Thu Jun 10 06:09:10 2010 +++ src/usr.sbin/sa/main.c Thu Jun 10 06:17:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.26 2010/06/10 06:09:10 dholland Exp $ */ +/* $NetBSD: main.c,v 1.27 2010/06/10 06:17:21 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1994\ Christopher G. Demetriou. All rights reserved.); -__RCSID($NetBSD: main.c,v 1.26 2010/06/10 06:09:10 dholland Exp $); +__RCSID($NetBSD: main.c,v 1.27 2010/06/10 06:17:21 dholland Exp $); #endif /* @@ -83,9 +83,7 @@ cmpf_t sa_cmp = cmp_usrsys; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int ch; int error; @@ -297,9 +295,7 @@ } static int -acct_load(pn, wr) - char *pn; - int wr; +acct_load(char *pn, int wr) { struct acct ac; struct cmdinfo ci; @@ -393,8 +389,7 @@ /* sort commands, doing the right thing in terms of reversals */ static int -cmp_comm(s1, s2) - const char *s1, *s2; +cmp_comm(const char *s1, const char *s2) { int rv; @@ -406,8 +401,7 @@ /* sort by total user and system time */ static int -cmp_usrsys(d1, d2) - const DBT *d1, *d2; +cmp_usrsys(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; u_quad_t t1, t2; @@ -428,8 +422,7 @@ /* sort by average user and system time */ static int -cmp_avgusrsys(d1, d2) - const DBT *d1, *d2; +cmp_avgusrsys(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; double t1, t2; @@ -453,8 +446,7 @@ /* sort by total number of disk I/O operations */ static int -cmp_dkio(d1, d2) - const DBT *d1, *d2; +cmp_dkio(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; @@ -471,8 +463,7 @@ /* sort by average number of disk I/O operations */ static int -cmp_avgdkio(d1, d2) - const DBT *d1, *d2; +cmp_avgdkio(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; double n1, n2; @@ -493,8 +484,7 @@ /* sort by the CPU-storage integral */ static int -cmp_cpumem(d1, d2) - const DBT *d1, *d2; +cmp_cpumem(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; @@ -511,8 +501,7 @@ /* sort by the CPU-time average memory usage */ static int -cmp_avgcpumem(d1, d2) - const DBT *d1, *d2; +cmp_avgcpumem(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; u_quad_t t1, t2; @@ -537,8 +526,7 @@ /* sort by the number of invocations */ static int -cmp_calls(d1, d2) - const DBT *d1, *d2; +cmp_calls(const DBT *d1, const DBT *d2) { struct cmdinfo c1, c2; @@ -554,7 +542,7 @@ } static void -usage() +usage(void) { (void)fprintf(stderr, @@ -564,8 +552,7 @@ } const char * -fmt(key) - const DBT *key; +fmt(const DBT *key) { static char *buf = NULL; static size_t len = 0; Index: src/usr.sbin/sa/pdb.c diff -u src/usr.sbin/sa/pdb.c:1.14 src/usr.sbin/sa/pdb.c:1.15 --- src/usr.sbin/sa/pdb.c:1.14 Thu Jun 10 06:09:10 2010 +++ src/usr.sbin/sa/pdb.c Thu Jun 10 06:17:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pdb.c,v 1.14 2010/06/10 06:09:10 dholland Exp $ */ +/* $NetBSD: pdb.c,v 1.15 2010/06/10 06:17:21 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pdb.c,v 1.14 2010/06/10 06:09:10 dholland Exp $); +__RCSID($NetBSD: pdb.c,v 1.15 2010/06/10 06:17:21 dholland Exp $); #endif #include sys/types.h @@ -56,7 +56,7 @@ static DB *pacct_db; int -pacct_init() +pacct_init(void) { DB *saved_pacct_db; int error; @@ -125,15 +125,14 @@ } void -pacct_destroy() +pacct_destroy(void) { if (DB_CLOSE(pacct_db) 0) warn(destroying process accounting stats); } int -pacct_add(ci) - const struct cmdinfo *ci; +pacct_add(const struct cmdinfo *ci) {
CVS commit: src/usr.sbin/sa
Module Name:src Committed By: dholland Date: Thu Jun 10 06:28:33 UTC 2010 Modified Files: src/usr.sbin/sa: main.c pdb.c Log Message: sprinkle some const To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sa/main.c cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sa/pdb.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/sa/main.c diff -u src/usr.sbin/sa/main.c:1.27 src/usr.sbin/sa/main.c:1.28 --- src/usr.sbin/sa/main.c:1.27 Thu Jun 10 06:17:21 2010 +++ src/usr.sbin/sa/main.c Thu Jun 10 06:28:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.27 2010/06/10 06:17:21 dholland Exp $ */ +/* $NetBSD: main.c,v 1.28 2010/06/10 06:28:33 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1994\ Christopher G. Demetriou. All rights reserved.); -__RCSID($NetBSD: main.c,v 1.27 2010/06/10 06:17:21 dholland Exp $); +__RCSID($NetBSD: main.c,v 1.28 2010/06/10 06:28:33 dholland Exp $); #endif /* @@ -60,7 +60,7 @@ #include extern.h #include pathnames.h -static int acct_load(char *, int); +static int acct_load(const char *, int); static u_quad_t decode_comp_t(comp_t); static int cmp_comm(const char *, const char *); static int cmp_usrsys(const DBT *, const DBT *); @@ -295,7 +295,7 @@ } static int -acct_load(char *pn, int wr) +acct_load(const char *pn, int wr) { struct acct ac; struct cmdinfo ci; Index: src/usr.sbin/sa/pdb.c diff -u src/usr.sbin/sa/pdb.c:1.15 src/usr.sbin/sa/pdb.c:1.16 --- src/usr.sbin/sa/pdb.c:1.15 Thu Jun 10 06:17:21 2010 +++ src/usr.sbin/sa/pdb.c Thu Jun 10 06:28:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pdb.c,v 1.15 2010/06/10 06:17:21 dholland Exp $ */ +/* $NetBSD: pdb.c,v 1.16 2010/06/10 06:28:33 dholland Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: pdb.c,v 1.15 2010/06/10 06:17:21 dholland Exp $); +__RCSID($NetBSD: pdb.c,v 1.16 2010/06/10 06:28:33 dholland Exp $); #endif #include sys/types.h @@ -49,7 +49,7 @@ #include extern.h #include pathnames.h -static int check_junk(struct cmdinfo *); +static int check_junk(const struct cmdinfo *); static void add_ci(const struct cmdinfo *, struct cmdinfo *); static void print_ci(const struct cmdinfo *, const struct cmdinfo *); @@ -318,7 +318,7 @@ } static int -check_junk(struct cmdinfo *cip) +check_junk(const struct cmdinfo *cip) { char *cp; size_t len;
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Thu Jun 10 13:21:13 UTC 2010 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c cgfourteenvar.h Log Message: Add a couple more hw offset definitions, add an ioctl() to set colour depth which works like Solaris and Linux, and finally make mmap() behave like an actual CG14. This should be all we need to get Xorg's suncg14 driver going. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sparc/dev/cgfourteen.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc/dev/cgfourteenvar.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/arch/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.63 src/sys/arch/sparc/dev/cgfourteen.c:1.64 --- src/sys/arch/sparc/dev/cgfourteen.c:1.63 Tue Jun 8 06:30:41 2010 +++ src/sys/arch/sparc/dev/cgfourteen.c Thu Jun 10 13:21:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.63 2010/06/08 06:30:41 macallan Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.64 2010/06/10 13:21:13 macallan Exp $ */ /* * Copyright (c) 1996 @@ -281,7 +281,10 @@ return; } sc-sc_regh = bh; - + sc-sc_regaddr = BUS_ADDR(sa-sa_slot, sa-sa_offset); + sc-sc_fbaddr = BUS_ADDR(sc-sc_physadr[CG14_PXL_IDX].sbr_slot, +sc-sc_physadr[CG14_PXL_IDX].sbr_offset); + sc-sc_ctl = (struct cg14ctl *) (bh); sc-sc_hwc = (struct cg14curs *) (bh + CG14_OFFSET_CURS); sc-sc_dac = (struct cg14dac *) (bh + CG14_OFFSET_DAC); @@ -473,6 +476,25 @@ cg14_set_video(sc, *(int *)data); break; + case CG14_SET_PIXELMODE: { + int depth = *(int *)data; + + switch (depth) { + case 8: + bus_space_write_1(sc-sc_bustag, sc-sc_regh, + CG14_MCTL, CG14_MCTL_ENABLEVID | + CG14_MCTL_PIXMODE_8 | CG14_MCTL_POWERCTL); + break; + case 32: + bus_space_write_1(sc-sc_bustag, sc-sc_regh, + CG14_MCTL, CG14_MCTL_ENABLEVID | + CG14_MCTL_PIXMODE_32 | CG14_MCTL_POWERCTL); + break; + default: + return EINVAL; + } + } + break; default: return (ENOTTY); } @@ -501,34 +523,13 @@ /* * Return the address that would map the given device at the given * offset, allowing for the given protection, or return -1 for error. - * - * Since we're pretending to be a cg8, we put the main video RAM at the - * same place the cg8 does, at offset 256k. The cg8 has an enable - * plane in the 256k space; our enable plane works differently. We - * can't emulate the enable plane very well, but all X uses it for is - * to clear it at startup - so we map the first page of video RAM over - * and over to fill that 256k space. We also map some other views of - * the video RAM space. - * - * Our memory map thus looks like - * - * mmap range space base offset - * -0004 vram 0 (multi-mapped - see above) - * 0004-00434800 vram - * 0100-0140 vram 0100 - * 0200-0220 vram 0200 - * 0280-02a0 vram 0280 - * 0300-0310 vram 0300 - * 0340-0350 vram 0340 - * 0380-0390 vram 0380 - * 03c0-03d0 vram 03c0 - * 1000-1001 regs (only if CG14_MAP_REGS) - */ + */ paddr_t cgfourteenmmap(dev_t dev, off_t off, int prot) { struct cgfourteen_softc *sc = device_lookup_private(cgfourteen_cd, minor(dev)); + off_t offset = -1; if (off PGOFSET) panic(cgfourteenmmap); @@ -536,43 +537,40 @@ if (off 0) return (-1); -#if defined(CG14_MAP_REGS) /* XXX: security hole */ - /* - * Map the control registers into user space. Should only be - * used for debugging! - */ - if ((u_int)off = 0x1000 (u_int)off 0x1000 + 16*4096) { - off -= 0x1000; - return (bus_space_mmap(sc-sc_bustag, - BUS_ADDR(sc-sc_physadr[CG14_CTL_IDX].sbr_slot, - sc-sc_physadr[CG14_CTL_IDX].sbr_offset), - off, prot, BUS_SPACE_MAP_LINEAR)); - } -#endif - - if (off COLOUR_OFFSET) - off = 0; - else if (off COLOUR_OFFSET+(1152*900*4)) - off -= COLOUR_OFFSET; - else { - switch (off 20) { - case 0x010: case 0x011: case 0x012: case 0x013: - case 0x020: case 0x021: - case 0x028: case 0x029: - case 0x030: - case 0x034: - case 0x038: - case 0x03c: -break; - default: -return(-1); - } - } - - return (bus_space_mmap(sc-sc_bustag, - BUS_ADDR(sc-sc_physadr[CG14_PXL_IDX].sbr_slot, - sc-sc_physadr[CG14_PXL_IDX].sbr_offset), - off, prot, BUS_SPACE_MAP_LINEAR)); + if (off = 0 off 0x1) { + offset = sc-sc_regaddr; + } else if (off = CG14_CURSOR_VOFF + off (CG14_CURSOR_VOFF + 0x1000)) { + offset = sc-sc_regaddr + CG14_OFFSET_CURS; + off -= CG14_CURSOR_VOFF; + } else if (off = CG14_DIRECT_VOFF + off (CG14_DIRECT_VOFF + sc-sc_vramsize)) { + offset = sc-sc_fbaddr + CG14_FB_VRAM; + off -= CG14_DIRECT_VOFF; + } else if (off = CG14_BGR_VOFF + off (CG14_BGR_VOFF + sc-sc_vramsize)) { + offset = sc-sc_fbaddr + CG14_FB_CBGR; + off -= CG14_BGR_VOFF; + } else if
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Thu Jun 10 13:26:46 UTC 2010 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h cg14_driver.c Log Message: Make ioctl(CG14_SET_PIXELMODE) a proper NetBSD ioctl() ( as in use _IOW ), also fix some bogosity in colour weights and depth. With this and the kernel changes committed earlier the cg14 in my SS20 works with the suncg14 driver. TODO: - beat some sanity in the order in which the Xserver issues various ioctl()s and opens or closes devices to reduce unnecessary flicker and make sure we end up in the right colour mode when entering and exiting X - add hw cursor support - support 8 bit visuals along with 24 bit or alone for high resolutions To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.1.1.1 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.2 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.1.1.1 Thu Feb 11 00:16:41 2010 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h Thu Jun 10 13:26:46 2010 @@ -68,6 +68,11 @@ * This should match corresponding definition in Solaris's * '/usr/include/sys/cg14io.h'. */ +#ifdef __NetBSD__ +#include sys/ioccom.h +#define CG14_SET_PIXELMODE _IOW('M', 3, int) +#else #define CG14_SET_PIXELMODE (('M' 8) | 3) +#endif #endif /* CG14_H */ Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.2 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.3 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.2 Sun Mar 14 01:14:51 2010 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Thu Jun 10 13:26:46 2010 @@ -331,12 +331,12 @@ deal with depth */ -if (!xf86SetDepthBpp(pScrn, 32, 0, 32, Support32bppFb)) { - return FALSE; -} else { - /* Check that the returned depth is one we support */ - switch (pScrn-depth) { +if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support24bppFb|Support32bppFb)) + return FALSE; +/* Check that the returned depth is one we support */ +switch (pScrn-depth) { case 32: + case 24: /* OK */ break; default: @@ -344,7 +344,6 @@ Given depth (%d) is not supported by this driver\n, pScrn-depth); return FALSE; - } } /* Collect all of the relevant option flags (fill in pScrn-options) */ @@ -360,7 +359,7 @@ * xf86SetWeight references it. */ if (pScrn-depth 8) { - rgb weight = {10, 11, 11}; + rgb weight = {0, 0, 0}; rgb mask = {0xff, 0xff00, 0xff}; if (!xf86SetWeight(pScrn, weight, mask)) { @@ -446,8 +445,11 @@ (pCg14-psdp-width * pCg14-psdp-height)); pCg14-xlut = xf86MapSbusMem (pCg14-psdp, CG14_XLUT_VOFF, 4096); -if (! pCg14-fb || !pCg14-x32 || !pCg14-xlut) +if (! pCg14-fb || !pCg14-x32 || !pCg14-xlut) { + xf86Msg(X_ERROR, can't mmap something: fd %08x x32 %08x xlut %08x\n, + (uint32_t)pCg14-fb, (uint32_t)pCg14-x32, (uint32_t)pCg14-xlut); return FALSE; +} /* Darken the screen for aesthetic reasons and set the viewport */ CG14SaveScreen(pScreen, SCREEN_SAVER_ON); @@ -541,6 +543,7 @@ static Bool CG14SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) { +xf86Msg(X_ERROR, CG14SwitchMode\n); return TRUE; } @@ -601,6 +604,7 @@ Cg14Ptr pCg14 = GET_CG14_FROM_SCRN(pScrn); pScrn-vtSema = FALSE; +CG14ExitCplane24 (pScrn); xf86UnmapSbusMem(pCg14-psdp, pCg14-fb, (pCg14-psdp-width * pCg14-psdp-height * 4)); xf86UnmapSbusMem(pCg14-psdp, pCg14-x32,
CVS commit: src/external/bsd/atf/dist
Module Name:src Committed By: jmmv Date: Thu Jun 10 15:27:03 UTC 2010 Modified Files: src/external/bsd/atf/dist/atf-run: atf-run.cpp test-program.cpp test-program.hpp src/external/bsd/atf/dist/tests/atf/atf-run: t_integration.sh Log Message: Pull up revision 2f7a426c0f4149d59a7f3717ebedd6c55998e8bc from upstream: -- Fix detection of crashed test cases Prevent cross-test-case contamination that occured when a first test case passed and the second crashed. The second could pick up the result of the first test case and not be reported as failed. Similarly, change the way timed out test cases are reported back to the caller. The creation of a temporary results file was just a really stupid way of passing information around and introduced false positives if the test case creates a results file before timing out. Fixes ticket #35. -- Problem originally reported by po...@. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-run/atf-run.cpp \ src/external/bsd/atf/dist/atf-run/test-program.cpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/atf/dist/atf-run/test-program.hpp cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/atf/dist/tests/atf/atf-run/t_integration.sh 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/atf/dist/atf-run/atf-run.cpp diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.2 --- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.1.1.2 Fri Jun 4 08:23:45 2010 +++ src/external/bsd/atf/dist/atf-run/atf-run.cpp Thu Jun 10 15:27:02 2010 @@ -97,7 +97,7 @@ const atf::tests::vars_map, const atf::fs::path); -atf::tests::tcr get_tcr(const atf::process::status, +atf::tests::tcr get_tcr(const std::string, const atf::process::status, const atf::fs::path) const; public: @@ -212,12 +212,16 @@ } atf::tests::tcr -atf_run::get_tcr(const atf::process::status s, +atf_run::get_tcr(const std::string broken_reason, + const atf::process::status s, const atf::fs::path resfile) const { using atf::tests::tcr; +if (!broken_reason.empty()) +return tcr(tcr::failed_state, broken_reason); + if (s.exited()) { try { const tcr ret = tcr::read(resfile); @@ -244,14 +248,10 @@ std::string(e.what())); } } else if (s.signaled()) { -try { -return tcr::read(resfile); -} catch (...) { -return tcr(tcr::failed_state, - Test program received signal + - atf::text::to_string(s.termsig()) + - (s.coredump() ? (core dumped) : )); -} +return tcr(tcr::failed_state, + Test program received signal + + atf::text::to_string(s.termsig()) + + (s.coredump() ? (core dumped) : )); } else { UNREACHABLE; throw std::runtime_error(Unknown exit status); @@ -311,6 +311,7 @@ } const atf::fs::path resfile = resdir.get_path() / tcr; +INV(!atf::fs::exists(resfile)); try { const bool use_fs = atf::text::to_bool( (*tcmd.find(use.fs)).second); @@ -321,34 +322,35 @@ atf::fs::temp_dir workdir(atf::fs::path(atf::config::get( atf_workdir)) / atf-run.XX); -const atf::process::status body_status = +std::pair std::string, const atf::process::status s = impl::run_test_case(tp, tcname, body, tcmd, config, resfile, workdir.get_path(), w); -const atf::process::status cleanup_status = -impl::run_test_case(tp, tcname, cleanup, tcmd, config, -resfile, workdir.get_path(), w); +(void)impl::run_test_case(tp, tcname, cleanup, tcmd, config, + resfile, workdir.get_path(), w); // TODO: Force deletion of workdir. -tcr = get_tcr(body_status, resfile); +tcr = get_tcr(s.first, s.second, resfile); } else { -const atf::process::status body_status = +std::pair std::string, const atf::process::status s = impl::run_test_case(tp, tcname, body, tcmd, config, resfile, ro_workdir, w); -const atf::process::status cleanup_status = -impl::run_test_case(tp, tcname, cleanup,
CVS commit: src/tests/util/df
Module Name:src Committed By: pooka Date: Thu Jun 10 15:44:44 UTC 2010 Modified Files: src/tests/util/df: t_df.sh Log Message: Catch up with whitespace changes in df.c rev 1.79 from over 2 years ago! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/util/df/t_df.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/util/df/t_df.sh diff -u src/tests/util/df/t_df.sh:1.4 src/tests/util/df/t_df.sh:1.5 --- src/tests/util/df/t_df.sh:1.4 Fri Jun 4 08:39:41 2010 +++ src/tests/util/df/t_df.sh Thu Jun 10 15:44:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_df.sh,v 1.4 2010/06/04 08:39:41 jmmv Exp $ +# $NetBSD: t_df.sh,v 1.5 2010/06/10 15:44:44 pooka Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,50 +35,50 @@ normal_body() { cat expout EOF Filesystem 1K-blocks Used Avail %Cap Mounted on -filer:/ 1202716672 135168 1202581504 0% /filer -filer:/ 1202716672 0 1202716672 0% /filer -filer:/ 1202716672 240543334 962173337 20% /filer -filer:/ 1202716672 721630003 481086668 60% /filer -filer:/ 1202716672 1142580838 60135833 95% /filer -filer:/ 1202716672 1202716672 0 100% /filer -filer:/ 1202716672 0 1142580838 0% /filer -filer:/ 1202716672 240543334 902037504 21% /filer -filer:/ 1202716672 721630003 420950835 63% /filer -filer:/ 1202716672 1142580838 0 100% /filer -filer:/ 1202716672 1202716672 -60135833 105% /filer -filer:/ 1202716672 0 1082445004 0% /filer -filer:/ 1202716672 240543334 841901670 22% /filer -filer:/ 1202716672 721630003 360815001 66% /filer -filer:/ 1202716672 1142580838 -60135833 105% /filer -filer:/ 1202716672 1202716672 -120271667 111% /filer -filer:/ 1202716672 0 1022309171 0% /filer -filer:/ 1202716672 240543334 781765836 23% /filer -filer:/ 1202716672 721630003 300679168 70% /filer -filer:/ 1202716672 1142580838 -120271667 111% /filer -filer:/ 1202716672 1202716672 -180407500 117% /filer -/dev/ld0g 1308726116 17901268 1225388540 1% /anon-root -/dev/ld0g 1308726116 0 1308726116 0% /anon-root -/dev/ld0g 1308726116 261745224 1046980892 20% /anon-root -/dev/ld0g 1308726116 785235672 523490444 60% /anon-root -/dev/ld0g 1308726116 1243289812 65436304 95% /anon-root -/dev/ld0g 1308726116 1308726116 0 100% /anon-root -/dev/ld0g 1308726116 0 1243289808 0% /anon-root -/dev/ld0g 1308726116 261745224 981544584 21% /anon-root -/dev/ld0g 1308726116 785235672 458054140 63% /anon-root -/dev/ld0g 1308726116 1243289812 0 100% /anon-root -/dev/ld0g 1308726116 1308726116 -65436304 105% /anon-root -/dev/ld0g 1308726116 0 1177853504 0% /anon-root -/dev/ld0g 1308726116 261745224 916108280 22% /anon-root -/dev/ld0g 1308726116 785235672 392617832 66% /anon-root -/dev/ld0g 1308726116 1243289812 -65436304 105% /anon-root -/dev/ld0g 1308726116 1308726116 -130872608 111% /anon-root -/dev/ld0g 1308726116 0 1112417196 0% /anon-root -/dev/ld0g 1308726116 261745224 850671972 23% /anon-root -/dev/ld0g 1308726116 785235672 327181528 70% /anon-root -/dev/ld0g 1308726116 1243289812 -130872608 111% /anon-root -/dev/ld0g 1308726116 1308726116 -196308916 117% /anon-root -/dev/strpct 21474836476 10737418240 10737418236 50% /strpct -/dev/wd0e 1048568828599327625756 27% /mount/windows/C +filer:/ 1202716672 135168 1202581504 0% /filer +filer:/ 1202716672 0 1202716672 0% /filer +filer:/ 1202716672 240543334 962173337 20% /filer +filer:/ 1202716672 721630003 481086668 60% /filer +filer:/ 1202716672 1142580838 60135833 95% /filer +filer:/ 1202716672 1202716672 0 100% /filer +filer:/ 1202716672 0 1142580838 0% /filer +filer:/ 1202716672 240543334 902037504 21% /filer +filer:/ 1202716672 721630003 420950835 63% /filer +filer:/ 1202716672 1142580838 0 100% /filer +filer:/ 1202716672 1202716672 -60135833 105% /filer +filer:/ 1202716672 0 1082445004 0% /filer +filer:/ 1202716672 240543334 841901670 22% /filer +filer:/ 1202716672 721630003 360815001 66% /filer +filer:/ 1202716672 1142580838 -60135833 105% /filer +filer:/ 1202716672 1202716672 -120271667 111% /filer +filer:/ 1202716672 0 1022309171 0% /filer +filer:/ 1202716672 240543334 781765836 23% /filer +filer:/ 1202716672 721630003 300679168 70% /filer +filer:/ 1202716672 1142580838 -120271667 111% /filer +filer:/ 1202716672 1202716672 -180407500 117% /filer +/dev/ld0g1308726116 17901268 1225388540 1% /anon-root +/dev/ld0g1308726116 0 1308726116 0%
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/sibyte/dev
Module Name:src Committed By: cliff Date: Thu Jun 10 17:33:21 UTC 2010 Modified Files: src/sys/arch/mips/sibyte/dev [matt-nb5-mips64]: sbbuswatchvar.h Log Message: insert missing */ thanks matt To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/sibyte/dev/sbbuswatchvar.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/arch/mips/sibyte/dev/sbbuswatchvar.h diff -u src/sys/arch/mips/sibyte/dev/sbbuswatchvar.h:1.1.2.1 src/sys/arch/mips/sibyte/dev/sbbuswatchvar.h:1.1.2.2 --- src/sys/arch/mips/sibyte/dev/sbbuswatchvar.h:1.1.2.1 Thu Jun 10 00:30:01 2010 +++ src/sys/arch/mips/sibyte/dev/sbbuswatchvar.h Thu Jun 10 17:33:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sbbuswatchvar.h,v 1.1.2.1 2010/06/10 00:30:01 cliff Exp $ */ +/* $NetBSD: sbbuswatchvar.h,v 1.1.2.2 2010/06/10 17:33:21 cliff Exp $ */ /* * Copyright (c) 2010, The NetBSD Foundation, Inc. All rights reserved. * @@ -25,6 +25,7 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. + */ #ifndef _ARCH_SIBYTE_DEV_SBBUSWATCHVAR_H #define _ARCH_SIBYTE_DEV_SBBUSWATCHVAR_H
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/sibyte/dev
Module Name:src Committed By: cliff Date: Thu Jun 10 17:35:04 UTC 2010 Modified Files: src/sys/arch/mips/sibyte/dev [matt-nb5-mips64]: sbbuswatch.c Log Message: insert missing */ thanks matt To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/sibyte/dev/sbbuswatch.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/mips/sibyte/dev/sbbuswatch.c diff -u src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.1.2.1 src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.1.2.2 --- src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.1.2.1 Thu Jun 10 00:30:01 2010 +++ src/sys/arch/mips/sibyte/dev/sbbuswatch.c Thu Jun 10 17:35:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sbbuswatch.c,v 1.1.2.1 2010/06/10 00:30:01 cliff Exp $ */ +/* $NetBSD: sbbuswatch.c,v 1.1.2.2 2010/06/10 17:35:04 cliff Exp $ */ /* * Copyright (c) 2010, The NetBSD Foundation, Inc. All rights reserved. * @@ -25,6 +25,7 @@ * 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/param.h #include sys/systm.h
CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips
Module Name:src Committed By: cliff Date: Thu Jun 10 17:40:20 UTC 2010 Modified Files: src/sys/arch/sbmips/include [matt-nb5-mips64]: systemsw.h src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: sb1250_icu.c Log Message: seperate initializing spl is from initizlizing the PIC: setting ipl_sr_map is moved from sb1250_icu_init to sb1250_ipl_map_init. To generate a diff of this commit: cvs rdiff -u -r1.7.28.5 -r1.7.28.6 src/sys/arch/sbmips/include/systemsw.h cvs rdiff -u -r1.9.36.14 -r1.9.36.15 src/sys/arch/sbmips/sbmips/sb1250_icu.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/sbmips/include/systemsw.h diff -u src/sys/arch/sbmips/include/systemsw.h:1.7.28.5 src/sys/arch/sbmips/include/systemsw.h:1.7.28.6 --- src/sys/arch/sbmips/include/systemsw.h:1.7.28.5 Thu Mar 11 08:20:59 2010 +++ src/sys/arch/sbmips/include/systemsw.h Thu Jun 10 17:40:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: systemsw.h,v 1.7.28.5 2010/03/11 08:20:59 matt Exp $ */ +/* $NetBSD: systemsw.h,v 1.7.28.6 2010/06/10 17:40:20 cliff Exp $ */ /* * Copyright 2000, 2001 @@ -58,6 +58,7 @@ void sb1250_icu_init(void); struct cpu_softc; void sb1250_cpu_init(struct cpu_softc *); +void sb1250_ipl_map_init(void); #define cpu_intr_establish(n,s,f,a) ((*systemsw.s_intr_establish)(n,s,f,a)) Index: src/sys/arch/sbmips/sbmips/sb1250_icu.c diff -u src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.9.36.14 src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.9.36.15 --- src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.9.36.14 Sun May 16 00:34:45 2010 +++ src/sys/arch/sbmips/sbmips/sb1250_icu.c Thu Jun 10 17:40:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sb1250_icu.c,v 1.9.36.14 2010/05/16 00:34:45 matt Exp $ */ +/* $NetBSD: sb1250_icu.c,v 1.9.36.15 2010/06/10 17:40:20 cliff Exp $ */ /* * Copyright 2000, 2001 @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sb1250_icu.c,v 1.9.36.14 2010/05/16 00:34:45 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: sb1250_icu.c,v 1.9.36.15 2010/06/10 17:40:20 cliff Exp $); #define __INTR_PRIVATE @@ -238,11 +238,17 @@ } void +sb1250_ipl_map_init(void) +{ + ipl_sr_map = sb1250_ipl_sr_map; +} + +void sb1250_icu_init(void) { const uint64_t imr_all = 0xULL; - ipl_sr_map = sb1250_ipl_sr_map; + KASSERT(memcmp((const void *)ipl_sr_map, (const void *)sb1250_ipl_sr_map, sizeof(ipl_sr_map)) == 0); /* zero out the list of used interrupts/lines */ memset(ints_for_ipl, 0, sizeof ints_for_ipl);
CVS commit: src/distrib/notes/common
Module Name:src Committed By: dholland Date: Thu Jun 10 17:49:32 UTC 2010 Modified Files: src/distrib/notes/common: main Log Message: .It, not .IT. Noticed by Henning Petersen in PR 43445. To generate a diff of this commit: cvs rdiff -u -r1.463 -r1.464 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.463 src/distrib/notes/common/main:1.464 --- src/distrib/notes/common/main:1.463 Mon May 3 16:15:05 2010 +++ src/distrib/notes/common/main Thu Jun 10 17:49:32 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: main,v 1.463 2010/05/03 16:15:05 tsutsui Exp $ +.\ $NetBSD: main,v 1.464 2010/06/10 17:49:32 dholland Exp $ .\ .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -1134,7 +1134,7 @@ .It Ta Jarom\('ir Dolecek Ta Mt jdole...@netbsd.org .It Ta Andy Doran Ta Mt a...@netbsd.org .It Ta Roland Dowdeswell Ta Mt el...@netbsd.org -.IT Ta Steven Drake Ta Mt s...@netbsd.org +.It Ta Steven Drake Ta Mt s...@netbsd.org .It Ta Emmanuel Dreyfus Ta Mt m...@netbsd.org .It Ta Matthias Drochner Ta Mt droch...@netbsd.org .It Ta Jun Ebihara Ta Mt j...@netbsd.org
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Thu Jun 10 18:34:21 UTC 2010 Modified Files: src/share/man/man4: ddb.4 Log Message: Fix a typo. Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/share/man/man4/ddb.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/ddb.4 diff -u src/share/man/man4/ddb.4:1.140 src/share/man/man4/ddb.4:1.141 --- src/share/man/man4/ddb.4:1.140 Wed Jun 9 02:48:52 2010 +++ src/share/man/man4/ddb.4 Thu Jun 10 18:34:21 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: ddb.4,v 1.140 2010/06/09 02:48:52 mrg Exp $ +.\ $NetBSD: ddb.4,v 1.141 2010/06/10 18:34:21 wiz Exp $ .\ .\ Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -56,7 +56,7 @@ .\ any improvements or extensions that they make and grant Carnegie Mellon .\ the rights to redistribute these changes. .\ -.Dd March 2, 2010 +.Dd June 9, 2010 .Dt DDB 4 .Os .Sh NAME @@ -922,7 +922,7 @@ .Ss ACORN26 .Bl -tag -width traptrace -compact .It Ic bsw -Writes a one or two bytes to the IObus. +Writes one or two bytes to the IObus. Takes an address and a value. Use the .Dq b
CVS commit: src/usr.bin/make
Module Name:src Committed By: wiz Date: Thu Jun 10 18:35:22 UTC 2010 Modified Files: src/usr.bin/make: make.1 Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.175 -r1.176 src/usr.bin/make/make.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/make.1 diff -u src/usr.bin/make/make.1:1.175 src/usr.bin/make/make.1:1.176 --- src/usr.bin/make/make.1:1.175 Wed Jun 9 16:58:22 2010 +++ src/usr.bin/make/make.1 Thu Jun 10 18:35:22 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: make.1,v 1.175 2010/06/09 16:58:22 christos Exp $ +.\ $NetBSD: make.1,v 1.176 2010/06/10 18:35:22 wiz Exp $ .\ .\ Copyright (c) 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -539,15 +539,15 @@ Variable substitution occurs at three distinct times, depending on where the variable is being used. .Bl -enum -.It +.It Variables in dependency lines are expanded as the line is read. .It Variables in shell commands are expanded when the shell command is executed. .It .Dq .for -loop index variables are expanded on each loop iteration. -Note that other variables are not expanded inside loops so +loop index variables are expanded on each loop iteration. +Note that other variables are not expanded inside loops so the following example code: .Bd -literal -offset indent @@ -558,7 +558,7 @@ .Dv .endfor all: -@echo ${a} + @echo ${a} @echo ${b} .Ed @@ -1360,12 +1360,12 @@ .Va .MAKE.EXPORTED is equivalent to exporting a variable. .It Ic .export-env Ar variable ... -The same as +The same as .Ql .export , -except that the variable is not appended to +except that the variable is not appended to .Va .MAKE.EXPORTED . -This allows exporting a value to the environment which is different from that -used by +This allows exporting a value to the environment which is different from that +used by .Nm internally. .It Ic .info Ar message
CVS commit: src/tests/lib
Module Name:src Committed By: pooka Date: Thu Jun 10 22:03:43 UTC 2010 Modified Files: src/tests/lib: Makefile Added Files: src/tests/lib/semaphore: Atffile Makefile sem.c src/tests/lib/semaphore/pthread: Atffile Makefile t_sem_pth.c Log Message: Add tests for semaphores. Note: the unlink one fails because our implementation is broken. I'll file a PR shortly. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/semaphore/Atffile \ src/tests/lib/semaphore/Makefile src/tests/lib/semaphore/sem.c cvs rdiff -u -r0 -r1.1 src/tests/lib/semaphore/pthread/Atffile \ src/tests/lib/semaphore/pthread/Makefile \ src/tests/lib/semaphore/pthread/t_sem_pth.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/lib/Makefile diff -u src/tests/lib/Makefile:1.2 src/tests/lib/Makefile:1.3 --- src/tests/lib/Makefile:1.2 Mon Nov 2 10:15:45 2009 +++ src/tests/lib/Makefile Thu Jun 10 22:03:43 2010 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2009/11/02 10:15:45 plunky Exp $ +# $NetBSD: Makefile,v 1.3 2010/06/10 22:03:43 pooka Exp $ .include bsd.own.mk -SUBDIR= libc libevent +SUBDIR= libc libevent semaphore TESTSDIR= ${TESTSBASE}/lib Added files: Index: src/tests/lib/semaphore/Atffile diff -u /dev/null src/tests/lib/semaphore/Atffile:1.1 --- /dev/null Thu Jun 10 22:03:44 2010 +++ src/tests/lib/semaphore/Atffile Thu Jun 10 22:03:43 2010 @@ -0,0 +1,6 @@ +Content-Type: application/X-atf-atffile; version=1 +X-NetBSD-Id: $NetBSD: Atffile,v 1.1 2010/06/10 22:03:43 pooka Exp $ + +prop: test-suite = NetBSD + +tp: pthread Index: src/tests/lib/semaphore/Makefile diff -u /dev/null src/tests/lib/semaphore/Makefile:1.1 --- /dev/null Thu Jun 10 22:03:44 2010 +++ src/tests/lib/semaphore/Makefile Thu Jun 10 22:03:43 2010 @@ -0,0 +1,9 @@ +# $NetBSD: Makefile,v 1.1 2010/06/10 22:03:43 pooka Exp $ +# + +SUBDIR= pthread + +TESTSDIR= ${TESTSBASE}/lib/semaphore + +.include bsd.test.mk +.include bsd.subdir.mk Index: src/tests/lib/semaphore/sem.c diff -u /dev/null src/tests/lib/semaphore/sem.c:1.1 --- /dev/null Thu Jun 10 22:03:44 2010 +++ src/tests/lib/semaphore/sem.c Thu Jun 10 22:03:43 2010 @@ -0,0 +1,299 @@ +/* $NetBSD: sem.c,v 1.1 2010/06/10 22:03:43 pooka Exp $ */ + +/* + * Common code for semaphore tests. This can be included both into + * programs using librt and libpthread. + */ + +#include sys/types.h + +#include rump/rump.h +#include rump/rump_syscalls.h + +#include atf-c.h +#include errno.h +#include fcntl.h +#include pthread.h +#include semaphore.h +#include sched.h +#include stdint.h +#include stdio.h +#include stdlib.h +#include unistd.h + +#include ../../h_macros.h + +ATF_TC(postwait); +ATF_TC_HEAD(postwait, tc) +{ + + atf_tc_set_md_var(tc, descr, tests post and wait from a + single thread (%s), LIBNAME); +} + +ATF_TC_BODY(postwait, tc) +{ + sem_t sem; + int rv; + + rump_init(); + + ATF_REQUIRE_EQ(sem_init(sem, 1, 0), 0); + + sem_post(sem); + sem_post(sem); + + sem_wait(sem); + sem_wait(sem); + rv = sem_trywait(sem); + ATF_REQUIRE(errno == EAGAIN); + ATF_REQUIRE(rv == -1); +} + +ATF_TC(initvalue); +ATF_TC_HEAD(initvalue, tc) +{ + + atf_tc_set_md_var(tc, descr, tests initialization with a non-zero + value (%s), LIBNAME); +} + +ATF_TC_BODY(initvalue, tc) +{ + sem_t sem; + + rump_init(); + sem_init(sem, 1, 4); + + ATF_REQUIRE_EQ(sem_trywait(sem), 0); + ATF_REQUIRE_EQ(sem_trywait(sem), 0); + ATF_REQUIRE_EQ(sem_trywait(sem), 0); + ATF_REQUIRE_EQ(sem_trywait(sem), 0); + ATF_REQUIRE_EQ(sem_trywait(sem), -1); +} + +ATF_TC(destroy); +ATF_TC_HEAD(destroy, tc) +{ + + atf_tc_set_md_var(tc, descr, tests sem_destroy works (%s), LIBNAME); +} + +ATF_TC_BODY(destroy, tc) +{ + sem_t sem; + int rv, i; + + rump_init(); + for (i = 0; i 2; i++) { + sem_init(sem, 1, 1); + + ATF_REQUIRE_EQ(sem_trywait(sem), 0); + ATF_REQUIRE_EQ(sem_trywait(sem), -1); + ATF_REQUIRE_EQ(sem_destroy(sem), 0); + rv = sem_trywait(sem); + ATF_REQUIRE_EQ(errno, EINVAL); + ATF_REQUIRE_EQ(rv, -1); + } +} + +ATF_TC(busydestroy); +ATF_TC_HEAD(busydestroy, tc) +{ + + atf_tc_set_md_var(tc, descr, tests sem_destroy report EBUSY for + a busy semaphore (%s), LIBNAME); +} + +static void * +hthread(void *arg) +{ + sem_t *semmarit = arg; + + for (;;) { + sem_post(semmarit[2]); + sem_wait(semmarit[1]); + sem_wait(semmarit[0]); + } +} + +ATF_TC_BODY(busydestroy, tc) +{ + sem_t semmarit[3]; + pthread_t pt; + int i; + + /* use a unicpu rump kernel. this means less chance for race */ + setenv(RUMP_NCPU, 1, 1); + + rump_init(); + sem_init(semmarit[0], 1, 0); + sem_init(semmarit[1], 1, 0); + sem_init(semmarit[2], 1, 0); + + pthread_create(pt, NULL, hthread, semmarit); + + /* + * Make a best-effort to catch the other thread with its pants down. + * We can't do this for sure, can we? Although, we could reach + * inside the rump kernel and inquire
CVS commit: src/etc/mtree
Module Name:src Committed By: pooka Date: Thu Jun 10 22:04:52 UTC 2010 Modified Files: src/etc/mtree: NetBSD.dist.base Log Message: update To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/etc/mtree/NetBSD.dist.base Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.21 src/etc/mtree/NetBSD.dist.base:1.22 --- src/etc/mtree/NetBSD.dist.base:1.21 Wed Jun 9 12:38:15 2010 +++ src/etc/mtree/NetBSD.dist.base Thu Jun 10 22:04:52 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.21 2010/06/09 12:38:15 pooka Exp $ +# $NetBSD: NetBSD.dist.base,v 1.22 2010/06/10 22:04:52 pooka Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -218,6 +218,8 @@ ./usr/libdata/debug/usr/tests/lib/libc/hash ./usr/libdata/debug/usr/tests/lib/libc/stdlib ./usr/libdata/debug/usr/tests/lib/libevent +./usr/libdata/debug/usr/tests/lib/semaphore +./usr/libdata/debug/usr/tests/lib/semaphore/pthread ./usr/libdata/debug/usr/tests/libexec ./usr/libdata/debug/usr/tests/libexec/ld.elf_so ./usr/libdata/debug/usr/tests/modules @@ -1116,6 +1118,8 @@ ./usr/tests/lib/libc ./usr/tests/lib/libc/hash ./usr/tests/lib/libc/stdlib +./usr/tests/lib/semaphore +./usr/tests/lib/semaphore/pthread ./usr/tests/lib/libevent ./usr/tests/libexec ./usr/tests/libexec/ld.elf_so
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Thu Jun 10 19:09:03 UTC 2010 Modified Files: src/sys/kern: syscalls.master Log Message: rump stubs for _ksem* To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/sys/kern/syscalls.master 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/syscalls.master diff -u src/sys/kern/syscalls.master:1.234 src/sys/kern/syscalls.master:1.235 --- src/sys/kern/syscalls.master:1.234 Fri Jun 4 16:32:00 2010 +++ src/sys/kern/syscalls.master Thu Jun 10 19:09:03 2010 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.234 2010/06/04 16:32:00 njoly Exp $ + $NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -480,17 +480,17 @@ struct timespec50 *timeout); } 245 UNIMPL sys_sigqueue 246 STD RUMP { int|sys||modctl(int cmd, void *arg); } -247 STD MODULAR { int|sys||_ksem_init(unsigned int value, intptr_t *idp); } -248 STD MODULAR { int|sys||_ksem_open(const char *name, int oflag, \ +247 STD MODULAR RUMP { int|sys||_ksem_init(unsigned int value, intptr_t *idp); } +248 STD MODULAR RUMP { int|sys||_ksem_open(const char *name, int oflag, \ mode_t mode, unsigned int value, intptr_t *idp); } -249 STD MODULAR { int|sys||_ksem_unlink(const char *name); } -250 STD MODULAR { int|sys||_ksem_close(intptr_t id); } -251 STD MODULAR { int|sys||_ksem_post(intptr_t id); } -252 STD MODULAR { int|sys||_ksem_wait(intptr_t id); } -253 STD MODULAR { int|sys||_ksem_trywait(intptr_t id); } -254 STD MODULAR { int|sys||_ksem_getvalue(intptr_t id, \ +249 STD MODULAR RUMP { int|sys||_ksem_unlink(const char *name); } +250 STD MODULAR RUMP { int|sys||_ksem_close(intptr_t id); } +251 STD MODULAR RUMP { int|sys||_ksem_post(intptr_t id); } +252 STD MODULAR RUMP { int|sys||_ksem_wait(intptr_t id); } +253 STD MODULAR RUMP { int|sys||_ksem_trywait(intptr_t id); } +254 STD MODULAR RUMP { int|sys||_ksem_getvalue(intptr_t id, \ unsigned int *value); } -255 STD MODULAR { int|sys||_ksem_destroy(intptr_t id); } +255 STD MODULAR RUMP { int|sys||_ksem_destroy(intptr_t id); } 256 UNIMPL sys__ksem_timedwait 257 STD MODULAR { mqd_t|sys||mq_open(const char * name, int oflag, \ mode_t mode, struct mq_attr *attr); }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Jun 10 20:36:55 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c Log Message: A small nit from the spec: _PSW should be called after _PTS. Thus call the wakedev routine after AcpiEnterSleepStatePrep(). Unlikely to make any difference whatsoever, but there might always be a BIOS writer who disagrees. To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/dev/acpi/acpi.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/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.202 src/sys/dev/acpi/acpi.c:1.203 --- src/sys/dev/acpi/acpi.c:1.202 Mon Jun 7 17:13:52 2010 +++ src/sys/dev/acpi/acpi.c Thu Jun 10 20:36:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.202 2010/06/07 17:13:52 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.203 2010/06/10 20:36:55 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.202 2010/06/07 17:13:52 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.203 2010/06/10 20:36:55 jruoho Exp $); #include opt_acpi.h #include opt_pcifixup.h @@ -1425,8 +1425,6 @@ if (ACPI_SUCCESS(rv)) aprint_debug_dev(sc-sc_dev, evaluated _TTS\n); - acpi_wakedev_commit(sc, state); - if (state != ACPI_STATE_S1 pmf_system_suspend(PMF_Q_NONE) != true) { aprint_error_dev(sc-sc_dev, aborting suspend\n); @@ -1437,7 +1435,6 @@ * This will evaluate the _PTS and _SST methods, * but unlike the documentation claims, not _GTS, * which is evaluated in AcpiEnterSleepState(). - * * This must be called with interrupts enabled. */ rv = AcpiEnterSleepStatePrep(state); @@ -1448,6 +1445,12 @@ break; } + /* + * After the _PTS method has been evaluated, we can + * enable wake and evaluate _PSW (ACPI 4.0, p. 284). + */ + acpi_wakedev_commit(sc, state); + sc-sc_sleepstate = state; if (state == ACPI_STATE_S1) {
CVS commit: src
Module Name:src Committed By: pooka Date: Thu Jun 10 22:41:41 UTC 2010 Modified Files: src: Makefile Log Message: descend into sys/rump/kern To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/Makefile diff -u src/Makefile:1.276 src/Makefile:1.277 --- src/Makefile:1.276 Sun Dec 13 09:29:27 2009 +++ src/Makefile Thu Jun 10 22:41:41 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.276 2009/12/13 09:29:27 mrg Exp $ +# $NetBSD: Makefile,v 1.277 2010/06/10 22:41:41 pooka Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -94,6 +94,7 @@ # do-external-lib: builds and installs prerequisites from external/lib. # do-sys-rump-dev-lib: builds and installs prerequisites from sys/rump/dev/lib # do-sys-rump-fs-lib: builds and installs prerequisites from sys/rump/fs/lib +# do-sys-rump-kern-lib: builds and installs prereq. from sys/rump/kern/lib # do-sys-rump-net-lib: builds and installs prerequisites from sys/rump/net/lib # do-sys-modules: builds and installs kernel modules (used by rump binaries) # do-ld.so:builds and installs prerequisites from libexec/ld.*_so. @@ -242,7 +243,8 @@ .if (${MACHINE} != evbppc) ${MKKMOD} != no BUILDTARGETS+= do-sys-modules .endif -BUILDTARGETS+= do-sys-rump-dev-lib do-sys-rump-fs-lib do-sys-rump-net-lib +BUILDTARGETS+= do-sys-rump-dev-lib do-sys-rump-fs-lib +BUILDTARGETS+= do-sys-rump-kern-lib do-sys-rump-net-lib .if ${MKCOMPAT} != no BUILDTARGETS+= do-compat-lib-csu BUILDTARGETS+= do-compat-libgcc @@ -414,7 +416,7 @@ BUILD_CC_LIB+= external/bsd/pcc/libpcc .endif -.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib/libdes lib gnu/lib external/lib crypto/external/lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/net/lib sys/modules +.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib/libdes lib gnu/lib external/lib crypto/external/lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/kern/lib sys/rump/net/lib sys/modules do-${dir:S/\//-/g}: .PHONY .MAKE .for targ in dependall install ${MAKEDIRTARGET} ${dir} ${targ}
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Thu Jun 10 19:06:26 UTC 2010 Modified Files: src/sys/kern: kern_proc.c Log Message: smoke the smoke, hack the hack, *beep* the *beep*, _KERNEL_OPT the _KERNEL_POT To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/kern/kern_proc.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_proc.c diff -u src/sys/kern/kern_proc.c:1.164 src/sys/kern/kern_proc.c:1.165 --- src/sys/kern/kern_proc.c:1.164 Fri Jun 4 23:02:18 2010 +++ src/sys/kern/kern_proc.c Thu Jun 10 19:06:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_proc.c,v 1.164 2010/06/04 23:02:18 rmind Exp $ */ +/* $NetBSD: kern_proc.c,v 1.165 2010/06/10 19:06:26 pooka Exp $ */ /*- * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,11 +62,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.164 2010/06/04 23:02:18 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.165 2010/06/10 19:06:26 pooka Exp $); +#ifdef _KERNEL_OPT #include opt_kstack.h #include opt_maxuprc.h #include opt_dtrace.h +#endif #include sys/param.h #include sys/systm.h
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Jun 10 21:40:42 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c rump.c rump_private.h rumpcopy.c signals.c vm.c Log Message: Use kern_proc.c instead of a collection of stubs. But what we really wanted from this commit was the support for proc_specificdata. TODO: make creating a new process actually use kern_proc and maybe even add an interface which starts a process with any pid you don't like To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.137 -r1.138 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.177 -r1.178 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.50 -r1.51 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.2 -r1.3 src/sys/rump/librump/rumpkern/rumpcopy.c \ src/sys/rump/librump/rumpkern/signals.c cvs rdiff -u -r1.82 -r1.83 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.88 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.89 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.88 Sun Jun 6 20:09:38 2010 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Thu Jun 10 21:40:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.88 2010/06/06 20:09:38 njoly Exp $ +# $NetBSD: Makefile.rumpkern,v 1.89 2010/06/10 21:40:42 pooka Exp $ # .include ${RUMPTOP}/Makefile.rump @@ -47,9 +47,9 @@ # sys/kern SRCS+= init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c \ kern_hook.c kern_ksyms.c kern_malloc_stdtype.c kern_module.c \ - kern_mutex_obj.c kern_ntptime.c kern_rate.c kern_resource.c \ - kern_stub.c kern_syscall.c kern_sysctl.c kern_tc.c \ - kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ + kern_mutex_obj.c kern_ntptime.c kern_proc.c kern_rate.c \ + kern_resource.c kern_stub.c kern_syscall.c kern_sysctl.c \ + kern_tc.c kern_timeout.c kern_uidinfo.c param.c sys_descrip.c \ sys_generic.c sys_module.c sys_pipe.c sys_select.c syscalls.c # sys/kern subr (misc) Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.137 src/sys/rump/librump/rumpkern/emul.c:1.138 --- src/sys/rump/librump/rumpkern/emul.c:1.137 Tue May 11 20:25:14 2010 +++ src/sys/rump/librump/rumpkern/emul.c Thu Jun 10 21:40:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.137 2010/05/11 20:25:14 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.138 2010/06/10 21:40:42 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.137 2010/05/11 20:25:14 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.138 2010/06/10 21:40:42 pooka Exp $); #include sys/param.h #include sys/null.h @@ -42,7 +42,6 @@ #include sys/device.h #include sys/queue.h #include sys/file.h -#include sys/filedesc.h #include sys/cpu.h #include sys/kmem.h #include sys/poll.h @@ -62,7 +61,6 @@ #include rump_private.h -kmutex_t *proc_lock; struct lwp lwp0; struct vnode *rootvp; dev_t rootdev = NODEV; @@ -114,28 +112,12 @@ .e_name = netbsd-rump, .e_sysent = rump_sysent, .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = syscall_intern, +#endif }; -struct proc * -p_find(pid_t pid, uint flags) -{ - - panic(%s: not implemented, __func__); -} - -struct pgrp * -pg_find(pid_t pid, uint flags) -{ - - panic(%s: not implemented, __func__); -} - -int -pgid_in_session(struct proc *p, pid_t pg_id) -{ - - panic(%s: not implemented, __func__); -} +u_int nprocs = 1; int kpause(const char *wmesg, bool intr, int timeo, kmutex_t *mtx) @@ -188,27 +170,6 @@ /* always sleepable, although we should improve this */ } -int -proc_uidmatch(kauth_cred_t cred, kauth_cred_t target) -{ - - panic(%s: not implemented, __func__); -} - -void -proc_crmod_enter(void) -{ - - panic(%s: not implemented, __func__); -} - -void -proc_crmod_leave(kauth_cred_t c1, kauth_cred_t c2, bool sugid) -{ - - panic(%s: not implemented, __func__); -} - void module_init_md(void) { @@ -236,29 +197,6 @@ } void (*delay_func)(unsigned int) = rump_delay; -void -proc_sesshold(struct session *ss) -{ - - panic(proc_sesshold() impossible, session %p, ss); -} - -void -proc_sessrele(struct session *ss) -{ - - panic(proc_sessrele() impossible, session %p, ss); -} - -int -proc_vmspace_getref(struct proc *p, struct vmspace **vm) -{ - - /* XXX */ - *vm = p-p_vmspace; - return 0; -} - int ttycheckoutq(struct tty *tp, int wait) { @@ -298,3 +236,12 @@ /* this function is __dead, we must exit */ rumpuser_exit(0); } + +#ifdef __HAVE_SYSCALL_INTERN +void +syscall_intern(struct proc *p) +{ + + /* no you don't */ +} +#endif Index:
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Thu Jun 10 22:00:03 UTC 2010 Modified Files: src/distrib/sets/lists/base: shl.elf shl.mi src/distrib/sets/lists/comp: mi shl.mi Log Message: update To generate a diff of this commit: cvs rdiff -u -r1.215 -r1.216 src/distrib/sets/lists/base/shl.elf cvs rdiff -u -r1.538 -r1.539 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.1461 -r1.1462 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.119 -r1.120 src/distrib/sets/lists/comp/shl.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/shl.elf diff -u src/distrib/sets/lists/base/shl.elf:1.215 src/distrib/sets/lists/base/shl.elf:1.216 --- src/distrib/sets/lists/base/shl.elf:1.215 Fri May 21 11:07:20 2010 +++ src/distrib/sets/lists/base/shl.elf Thu Jun 10 22:00:02 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.elf,v 1.215 2010/05/21 11:07:20 pooka Exp $ +# $NetBSD: shl.elf,v 1.216 2010/06/10 22:00:02 pooka Exp $ # # Note: Do not mark old major and major.minor shared libraries as # obsolete; just remove the entry, as third-party applications @@ -334,6 +334,8 @@ ./usr/lib/librumpvfs_fifofs.so.0 base-rump-shlib ./usr/lib/librumpvfs_layerfs.so base-rump-shlib ./usr/lib/librumpvfs_layerfs.so.0 base-rump-shlib +./usr/lib/librumpkern_ksem.so base-rump-shlib +./usr/lib/librumpkern_ksem.so.0 base-rump-shlib ./usr/lib/librumpnet.sobase-rump-shlib ./usr/lib/librumpnet.so.0 base-rump-shlib ./usr/lib/librumpnet_local.so base-rump-shlib Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.538 src/distrib/sets/lists/base/shl.mi:1.539 --- src/distrib/sets/lists/base/shl.mi:1.538 Mon Jun 7 13:52:29 2010 +++ src/distrib/sets/lists/base/shl.mi Thu Jun 10 22:00:02 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.538 2010/06/07 13:52:29 tnozaki Exp $ +# $NetBSD: shl.mi,v 1.539 2010/06/10 22:00:02 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -174,6 +174,7 @@ ./usr/lib/librumpfs_union.so.0.0 base-rump-shlib ./usr/lib/librumpvfs_fifofs.so.0.0 base-rump-shlib ./usr/lib/librumpvfs_layerfs.so.0.0 base-rump-shlib +./usr/lib/librumpkern_ksem.so.0.0 base-rump-shlib ./usr/lib/librumpnet.so.0.0 base-rump-shlib ./usr/lib/librumpnet_local.so.0.0 base-rump-shlib ./usr/lib/librumpnet_net.so.0.0 base-rump-shlib Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1461 src/distrib/sets/lists/comp/mi:1.1462 --- src/distrib/sets/lists/comp/mi:1.1461 Wed Jun 9 19:06:31 2010 +++ src/distrib/sets/lists/comp/mi Thu Jun 10 22:00:03 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1461 2010/06/09 19:06:31 riz Exp $ +# $NetBSD: mi,v 1.1462 2010/06/10 22:00:03 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2716,6 +2716,9 @@ ./usr/lib/librumpvfs_layerfs.a comp-c-lib ./usr/lib/librumpvfs_layerfs_g.a -unknown- debuglib ./usr/lib/librumpvfs_layerfs_p.a comp-c-proflib profile +./usr/lib/librumpkern_ksem.a comp-c-lib +./usr/lib/librumpkern_ksem_g.a -unknown- debuglib +./usr/lib/librumpkern_ksem_p.a comp-c-proflib profile ./usr/lib/librumpnet.acomp-c-lib ./usr/lib/librumpnet_g.a -unknown- debuglib ./usr/lib/librumpnet_p.a comp-c-proflib profile Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.119 src/distrib/sets/lists/comp/shl.mi:1.120 --- src/distrib/sets/lists/comp/shl.mi:1.119 Mon Jun 7 13:52:29 2010 +++ src/distrib/sets/lists/comp/shl.mi Thu Jun 10 22:00:03 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.119 2010/06/07 13:52:29 tnozaki Exp $ +# $NetBSD: shl.mi,v 1.120 2010/06/10 22:00:03 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -134,6 +134,7 @@ ./usr/lib/librumpfs_umap_pic.a comp-c-piclib ./usr/lib/librumpfs_umapfs_pic.a comp-obsolete obsolete ./usr/lib/librumpfs_union_pic.a comp-c-piclib +./usr/lib/librumpkern_ksem_pic.a comp-c-piclib ./usr/lib/librumpnet_local_pic.a comp-c-piclib ./usr/lib/librumpnet_net80211_pic.a comp-c-piclib ./usr/lib/librumpnet_net_pic.a comp-c-piclib
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Thu Jun 10 21:56:42 UTC 2010 Modified Files: src/sys/rump: Makefile Added Files: src/sys/rump/kern: Makefile src/sys/rump/kern/lib: Makefile Makefile.inc src/sys/rump/kern/lib/libksem: Makefile shlib_version Log Message: Add infrastructure for kern compnents. This is meant for those components which are too bloaty to be included in rumpkern (where bloaty means can be easily left out without anyone missing), but generally do not require the support of the dev/fs/net factions to function. As the first one, add ksems. librumpcrypto will migrate here too once I get my timeslice to deal with the setlists, as most likely will tty support. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/Makefile cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/Makefile \ src/sys/rump/kern/lib/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libksem/Makefile \ src/sys/rump/kern/lib/libksem/shlib_version 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/Makefile diff -u src/sys/rump/Makefile:1.5 src/sys/rump/Makefile:1.6 --- src/sys/rump/Makefile:1.5 Fri Sep 4 17:21:34 2009 +++ src/sys/rump/Makefile Thu Jun 10 21:56:42 2010 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.5 2009/09/04 17:21:34 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2010/06/10 21:56:42 pooka Exp $ # -SUBDIR= include librump dev fs net +SUBDIR= include librump dev fs kern net .include bsd.subdir.mk Added files: Index: src/sys/rump/kern/Makefile diff -u /dev/null src/sys/rump/kern/Makefile:1.1 --- /dev/null Thu Jun 10 21:56:42 2010 +++ src/sys/rump/kern/Makefile Thu Jun 10 21:56:42 2010 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2010/06/10 21:56:42 pooka Exp $ +# + +SUBDIR= lib + +.include bsd.subdir.mk Index: src/sys/rump/kern/lib/Makefile diff -u /dev/null src/sys/rump/kern/lib/Makefile:1.1 --- /dev/null Thu Jun 10 21:56:42 2010 +++ src/sys/rump/kern/lib/Makefile Thu Jun 10 21:56:42 2010 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2010/06/10 21:56:42 pooka Exp $ +# + +SUBDIR+= libksem + +.include bsd.subdir.mk Index: src/sys/rump/kern/lib/Makefile.inc diff -u /dev/null src/sys/rump/kern/lib/Makefile.inc:1.1 --- /dev/null Thu Jun 10 21:56:42 2010 +++ src/sys/rump/kern/lib/Makefile.inc Thu Jun 10 21:56:42 2010 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile.inc,v 1.1 2010/06/10 21:56:42 pooka Exp $ +# + +RUMPTOP= ${.CURDIR}/../../.. + +.include ${RUMPTOP}/Makefile.rump Index: src/sys/rump/kern/lib/libksem/Makefile diff -u /dev/null src/sys/rump/kern/lib/libksem/Makefile:1.1 --- /dev/null Thu Jun 10 21:56:42 2010 +++ src/sys/rump/kern/lib/libksem/Makefile Thu Jun 10 21:56:42 2010 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2010/06/10 21:56:42 pooka Exp $ +# + +.PATH: ${.CURDIR}/../../../../kern + +LIB= rumpkern_ksem + +SRCS= uipc_sem.c + +.include bsd.lib.mk +.include bsd.klinks.mk Index: src/sys/rump/kern/lib/libksem/shlib_version diff -u /dev/null src/sys/rump/kern/lib/libksem/shlib_version:1.1 --- /dev/null Thu Jun 10 21:56:42 2010 +++ src/sys/rump/kern/lib/libksem/shlib_version Thu Jun 10 21:56:42 2010 @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2010/06/10 21:56:42 pooka Exp $ +# +major=0 +minor=0
CVS commit: src/tests/lib/semaphore
Module Name:src Committed By: pooka Date: Thu Jun 10 22:20:38 UTC 2010 Modified Files: src/tests/lib/semaphore: sem.c Log Message: quote PR kern/43452 in descr To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/semaphore/sem.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/lib/semaphore/sem.c diff -u src/tests/lib/semaphore/sem.c:1.1 src/tests/lib/semaphore/sem.c:1.2 --- src/tests/lib/semaphore/sem.c:1.1 Thu Jun 10 22:03:43 2010 +++ src/tests/lib/semaphore/sem.c Thu Jun 10 22:20:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.1 2010/06/10 22:03:43 pooka Exp $ */ +/* $NetBSD: sem.c,v 1.2 2010/06/10 22:20:38 pooka Exp $ */ /* * Common code for semaphore tests. This can be included both into @@ -262,8 +262,8 @@ { /* this is currently broken. i'll append the PR number soon */ - atf_tc_set_md_var(tc, descr, tests unlinked semaphores are valid - and can be closed (%s), LIBNAME); + atf_tc_set_md_var(tc, descr, tests unlinked semaphores can be + closed, PR kern/43452 (%s), LIBNAME); } #define SEM /thesem
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Thu Jun 10 19:10:10 UTC 2010 Modified Files: src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c Log Message: regen: ksem syscalls To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.45 -r1.46 src/sys/rump/librump/rumpkern/rump_syscalls.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/rump_syscalls.h diff -u src/sys/rump/include/rump/rump_syscalls.h:1.25 src/sys/rump/include/rump/rump_syscalls.h:1.26 --- src/sys/rump/include/rump/rump_syscalls.h:1.25 Fri Jun 4 16:33:32 2010 +++ src/sys/rump/include/rump/rump_syscalls.h Thu Jun 10 19:10:10 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: rump_syscalls.h,v 1.25 2010/06/04 16:33:32 njoly Exp $ */ +/* $NetBSD: rump_syscalls.h,v 1.26 2010/06/10 19:10:10 pooka Exp $ */ /* * System call protos in rump namespace. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.234 2010/06/04 16:32:00 njoly Exp + * created from NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp */ #ifndef _RUMP_RUMP_SYSCALLS_H_ @@ -81,6 +81,15 @@ int rump_sys_poll(struct pollfd *, u_int, int); int rump_sys_fdatasync(int); int rump_sys_modctl(int, void *); +int rump_sys__ksem_init(unsigned int, intptr_t *); +int rump_sys__ksem_open(const char *, int, mode_t, unsigned int, intptr_t *); +int rump_sys__ksem_unlink(const char *); +int rump_sys__ksem_close(intptr_t); +int rump_sys__ksem_post(intptr_t); +int rump_sys__ksem_wait(intptr_t); +int rump_sys__ksem_trywait(intptr_t); +int rump_sys__ksem_getvalue(intptr_t, unsigned int *); +int rump_sys__ksem_destroy(intptr_t); int rump_sys_lchmod(const char *, mode_t); int rump_sys_lchown(const char *, uid_t, gid_t); int rump_sys_fchroot(int); Index: src/sys/rump/librump/rumpkern/rump_syscalls.c diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.45 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.46 --- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.45 Fri Jun 4 16:33:32 2010 +++ src/sys/rump/librump/rumpkern/rump_syscalls.c Thu Jun 10 19:10:09 2010 @@ -1,14 +1,14 @@ -/* $NetBSD: rump_syscalls.c,v 1.45 2010/06/04 16:33:32 njoly Exp $ */ +/* $NetBSD: rump_syscalls.c,v 1.46 2010/06/10 19:10:09 pooka Exp $ */ /* * System call vector and marshalling for rump. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.234 2010/06/04 16:32:00 njoly Exp + * created from NetBSD: syscalls.master,v 1.235 2010/06/10 19:09:03 pooka Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.45 2010/06/04 16:33:32 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_syscalls.c,v 1.46 2010/06/10 19:10:09 pooka Exp $); #include sys/types.h #include sys/param.h @@ -1366,6 +1366,192 @@ } __weak_alias(sys_modctl,rump_enosys); +int rump_sys__ksem_init(unsigned int, intptr_t *); +int +rump_sys__ksem_init(unsigned int value, intptr_t * idp) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct sys__ksem_init_args callarg; + + SPARG(callarg, value) = value; + SPARG(callarg, idp) = idp; + + error = rump_sysproxy(SYS__ksem_init, rump_sysproxy_arg, + (uint8_t *)callarg, sizeof(callarg), rval); + if (error) { + rval[0] = -1; + rumpuser_seterrno(error); + } + return rval[0]; +} +__weak_alias(sys__ksem_init,rump_enosys); + +int rump_sys__ksem_open(const char *, int, mode_t, unsigned int, intptr_t *); +int +rump_sys__ksem_open(const char * name, int oflag, mode_t mode, unsigned int value, intptr_t * idp) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct sys__ksem_open_args callarg; + + SPARG(callarg, name) = name; + SPARG(callarg, oflag) = oflag; + SPARG(callarg, mode) = mode; + SPARG(callarg, value) = value; + SPARG(callarg, idp) = idp; + + error = rump_sysproxy(SYS__ksem_open, rump_sysproxy_arg, + (uint8_t *)callarg, sizeof(callarg), rval); + if (error) { + rval[0] = -1; + rumpuser_seterrno(error); + } + return rval[0]; +} +__weak_alias(sys__ksem_open,rump_enosys); + +int rump_sys__ksem_unlink(const char *); +int +rump_sys__ksem_unlink(const char * name) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct sys__ksem_unlink_args callarg; + + SPARG(callarg, name) = name; + + error = rump_sysproxy(SYS__ksem_unlink, rump_sysproxy_arg, + (uint8_t *)callarg, sizeof(callarg), rval); + if (error) { + rval[0] = -1; + rumpuser_seterrno(error); + } + return rval[0]; +} +__weak_alias(sys__ksem_unlink,rump_enosys); + +int rump_sys__ksem_close(intptr_t); +int +rump_sys__ksem_close(intptr_t id) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct sys__ksem_close_args callarg; + + SPARG(callarg, id) = id; + + error = rump_sysproxy(SYS__ksem_close, rump_sysproxy_arg, + (uint8_t *)callarg, sizeof(callarg),
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Thu Jun 10 20:54:53 UTC 2010 Modified Files: src/sys/kern: init_main.c kern_lwp.c kern_proc.c src/sys/sys: lwp.h Log Message: lwp0 seems like an lwp instead of a process, so move bits related to it from kern_proc.c to kern_lwp.c. This makes kern_proc scheduling-clean and more easily usable in environments with a non-integrated scheduler (like, to take a random example, rump). To generate a diff of this commit: cvs rdiff -u -r1.419 -r1.420 src/sys/kern/init_main.c cvs rdiff -u -r1.146 -r1.147 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.165 -r1.166 src/sys/kern/kern_proc.c cvs rdiff -u -r1.133 -r1.134 src/sys/sys/lwp.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_main.c diff -u src/sys/kern/init_main.c:1.419 src/sys/kern/init_main.c:1.420 --- src/sys/kern/init_main.c:1.419 Wed Apr 21 16:51:24 2010 +++ src/sys/kern/init_main.c Thu Jun 10 20:54:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.419 2010/04/21 16:51:24 pooka Exp $ */ +/* $NetBSD: init_main.c,v 1.420 2010/06/10 20:54:53 pooka 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.419 2010/04/21 16:51:24 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.420 2010/06/10 20:54:53 pooka Exp $); #include opt_ddb.h #include opt_ipsec.h @@ -247,7 +247,6 @@ #include sys/userconf.h #endif -extern struct proc proc0; extern struct lwp lwp0; extern time_t rootfstime; @@ -387,6 +386,7 @@ /* Create process 0. */ proc0_init(); + lwp0_init(); /* Disable preemption during boot. */ kpreempt_disable(); Index: src/sys/kern/kern_lwp.c diff -u src/sys/kern/kern_lwp.c:1.146 src/sys/kern/kern_lwp.c:1.147 --- src/sys/kern/kern_lwp.c:1.146 Fri Apr 23 19:18:09 2010 +++ src/sys/kern/kern_lwp.c Thu Jun 10 20:54:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.146 2010/04/23 19:18:09 rmind Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.147 2010/06/10 20:54:53 pooka Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -209,7 +209,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.146 2010/04/23 19:18:09 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.147 2010/06/10 20:54:53 pooka Exp $); #include opt_ddb.h #include opt_lockdebug.h @@ -259,6 +259,27 @@ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +struct turnstile turnstile0; +struct lwp lwp0 __aligned(MIN_LWP_ALIGNMENT) = { +#ifdef LWP0_CPU_INFO + .l_cpu = LWP0_CPU_INFO, +#endif + .l_proc = proc0, + .l_lid = 1, + .l_flag = LW_SYSTEM, + .l_stat = LSONPROC, + .l_ts = turnstile0, + .l_syncobj = sched_syncobj, + .l_refcnt = 1, + .l_priority = PRI_USER + NPRI_USER - 1, + .l_inheritedprio = -1, + .l_class = SCHED_OTHER, + .l_psid = PS_NONE, + .l_pi_lenders = SLIST_HEAD_INITIALIZER(lwp0.l_pi_lenders), + .l_name = __UNCONST(swapper), + .l_fd = filedesc0, +}; + void lwpinit(void) { @@ -269,6 +290,28 @@ lwppl, NULL, IPL_NONE, NULL, NULL, NULL); } +void +lwp0_init(void) +{ + struct lwp *l = lwp0; + + KASSERT((void *)uvm_lwp_getuarea(l) != NULL); + KASSERT(l-l_lid == p-p_nlwpid); + + LIST_INSERT_HEAD(alllwp, l, l_list); + + callout_init(l-l_timeout_ch, CALLOUT_MPSAFE); + callout_setfunc(l-l_timeout_ch, sleepq_timeout, l); + cv_init(l-l_sigcv, sigwait); + + kauth_cred_hold(proc0.p_cred); + l-l_cred = proc0.p_cred; + + lwp_initspecific(l); + + SYSCALL_TIME_LWP_INIT(l); +} + /* * Set an suspended. * Index: src/sys/kern/kern_proc.c diff -u src/sys/kern/kern_proc.c:1.165 src/sys/kern/kern_proc.c:1.166 --- src/sys/kern/kern_proc.c:1.165 Thu Jun 10 19:06:26 2010 +++ src/sys/kern/kern_proc.c Thu Jun 10 20:54:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_proc.c,v 1.165 2010/06/10 19:06:26 pooka Exp $ */ +/* $NetBSD: kern_proc.c,v 1.166 2010/06/10 20:54:53 pooka Exp $ */ /*- * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.165 2010/06/10 19:06:26 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.166 2010/06/10 20:54:53 pooka Exp $); #ifdef _KERNEL_OPT #include opt_kstack.h @@ -166,7 +166,6 @@ struct pstats pstat0; struct vmspace vmspace0; struct sigacts sigacts0; -struct turnstile turnstile0; struct proc proc0 = { .p_lwps = LIST_HEAD_INITIALIZER(proc0.p_lwps), .p_sigwaiters = LIST_HEAD_INITIALIZER(proc0.p_sigwaiters), @@ -190,25 +189,6 @@ .p_stats = pstat0, .p_sigacts = sigacts0, }; -struct lwp lwp0 __aligned(MIN_LWP_ALIGNMENT) = { -#ifdef LWP0_CPU_INFO - .l_cpu = LWP0_CPU_INFO, -#endif - .l_proc = proc0, - .l_lid = 1, - .l_flag = LW_SYSTEM, - .l_stat = LSONPROC, - .l_ts = turnstile0, - .l_syncobj = sched_syncobj, - .l_refcnt = 1, - .l_priority = PRI_USER + NPRI_USER - 1, - .l_inheritedprio =
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pooka Date: Thu Jun 10 22:07:33 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Log Message: update To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/distrib/sets/lists/tests/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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.83 src/distrib/sets/lists/tests/mi:1.84 --- src/distrib/sets/lists/tests/mi:1.83 Wed Jun 9 21:36:45 2010 +++ src/distrib/sets/lists/tests/mi Thu Jun 10 22:07:33 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.83 2010/06/09 21:36:45 njoly Exp $ +# $NetBSD: mi,v 1.84 2010/06/10 22:07:33 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -183,6 +183,9 @@ ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mi_vector_hash.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/stringtests-obsolete obsolete ./usr/libdata/debug/usr/tests/lib/libc/string/t_popcount.debug tests-obsolete obsolete +./usr/libdata/debug/usr/tests/lib/semaphoretests-lib-debug +./usr/libdata/debug/usr/tests/lib/semaphore/pthread tests-lib-debug +./usr/libdata/debug/usr/tests/lib/semaphore/pthread/t_sem_pth.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libeventtests-lib-debug ./usr/libdata/debug/usr/tests/lib/libevent/h_event.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/libexec tests-lib-debug @@ -1100,6 +1103,11 @@ ./usr/tests/lib/libc/string tests-obsolete obsolete ./usr/tests/lib/libc/string/Atffile tests-obsolete obsolete ./usr/tests/lib/libc/string/t_popcount tests-obsolete obsolete +./usr/tests/lib/semaphore tests-lib-tests +./usr/tests/lib/semaphore/Atffile tests-lib-tests atf +./usr/tests/lib/semaphore/pthread tests-lib-tests +./usr/tests/lib/semaphore/pthread/Atffile tests-lib-tests atf +./usr/tests/lib/semaphore/pthread/t_sem_pth tests-lib-tests atf ./usr/tests/lib/libevent tests-lib-tests ./usr/tests/lib/libevent/Atffile tests-lib-tests atf ./usr/tests/lib/libevent/h_event tests-lib-tests atf
CVS commit: src/tests/util/grep
Module Name:src Committed By: pooka Date: Thu Jun 10 23:49:49 UTC 2010 Modified Files: src/tests/util/grep: Makefile d_basic.out t_grep.sh Added Files: src/tests/util/grep: d_file_exp.in d_file_exp.out Removed Files: src/tests/util/grep: d_file_exp.inout Log Message: Make tests operate in environments without /usr/share/dict/words, such as the one used by anita test. This has also the added benefit of decoupling the tests from whataver is in words, should that file ever be updated. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/util/grep/Makefile \ src/tests/util/grep/d_basic.out cvs rdiff -u -r0 -r1.1 src/tests/util/grep/d_file_exp.in \ src/tests/util/grep/d_file_exp.out cvs rdiff -u -r1.1 -r0 src/tests/util/grep/d_file_exp.inout cvs rdiff -u -r1.2 -r1.3 src/tests/util/grep/t_grep.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/util/grep/Makefile diff -u src/tests/util/grep/Makefile:1.1 src/tests/util/grep/Makefile:1.2 --- src/tests/util/grep/Makefile:1.1 Fri Feb 13 05:19:51 2009 +++ src/tests/util/grep/Makefile Thu Jun 10 23:49:48 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/02/13 05:19:51 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2010/06/10 23:49:48 pooka Exp $ NOMAN= # defined @@ -23,7 +23,8 @@ FILES+= d_context_c.out FILES+= d_context_d.out FILES+= d_egrep.out -FILES+= d_file_exp.inout +FILES+= d_file_exp.in +FILES+= d_file_exp.out FILES+= d_ignore_case.out FILES+= d_input FILES+= d_invert.in Index: src/tests/util/grep/d_basic.out diff -u src/tests/util/grep/d_basic.out:1.1 src/tests/util/grep/d_basic.out:1.2 --- src/tests/util/grep/d_basic.out:1.1 Fri Feb 13 05:19:51 2009 +++ src/tests/util/grep/d_basic.out Thu Jun 10 23:49:48 2010 @@ -1,119 +1,20 @@ -aa -aal -aalii -aam -aardvark -aardwolf -Afrikaans -ahaaina -Alcaaba -amaas -assbaa -baa -baahling -Baal -baal -Baalath -Baalish -Baalism -Baalist -Baalite -Baalitical -Baalize -Baalshem -baar -Balaam -Balaamite -Balaamitical -balmacaan -Bastaard -bataan -baviaantje -bazaar -berghaan -Bilaan -caam -caama -caaming -caapeba -caatinga -cabaan -Canaan -Canaanite -Canaanitess -Canaanitic -Canaanitish -chaa -daalder -Danaan -encraal -enkraal -golandaas -Graafian -haab -haaf -heemraad -Isaac -Jaalin -knorhaan -kraal -laager -laang -Landsmaal -maam -maamselle -macaasim -malaanonang -molengraaffite -mushaa -naa -naam -Naaman -Naassenes -nagmaal -paal -paar -paauw -paraaminobenzoic -praam -raad -raash -reaal -Rigsmaal -Riksmaal -saa -Saan -Saarbrucken -salaam -salaamlike -Sangraal -saraad -schaapsteker -schoolmaam -schoolmaamish -Senaah -shaatnez -skokiaan -springhaas -staab -Staatsrat -taa -Taal -Taalbond -taar -Takhaar -taysaam -teewhaap -tetraamylose -Transvaal -Transvaaler -Transvaalian -Tzaam -vaagmer -vaalite -Vaalpens -Waac -waag -waapa -waar -Waasi +123 +1123 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +2123 +3123 +4123 +5123 +6123 +7123 +8123 +9123 Index: src/tests/util/grep/t_grep.sh diff -u src/tests/util/grep/t_grep.sh:1.2 src/tests/util/grep/t_grep.sh:1.3 --- src/tests/util/grep/t_grep.sh:1.2 Fri Jun 4 08:39:41 2010 +++ src/tests/util/grep/t_grep.sh Thu Jun 10 23:49:48 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_grep.sh,v 1.2 2010/06/04 08:39:41 jmmv Exp $ +# $NetBSD: t_grep.sh,v 1.3 2010/06/10 23:49:48 pooka Exp $ # # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,8 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -words=/usr/share/dict/words - atf_test_case basic basic_head() { @@ -34,7 +32,8 @@ } basic_body() { - atf_check -o file:$(atf_get_srcdir)/d_basic.out grep aa ${words} + atf_check -o file:$(atf_get_srcdir)/d_basic.out \ + sh -c 'jot 1 | grep 123' } atf_test_case binary @@ -170,8 +169,8 @@ } file_exp_body() { - atf_check -o file:$(atf_get_srcdir)/d_file_exp.inout \ - grep -f $(atf_get_srcdir)/d_file_exp.inout ${words} + atf_check -o file:$(atf_get_srcdir)/d_file_exp.out \ + sh -c 'jot 21 -1 1.00 | grep -f '$(atf_get_srcdir)'/d_file_exp.in' } atf_test_case egrep Added files: Index: src/tests/util/grep/d_file_exp.in diff -u /dev/null src/tests/util/grep/d_file_exp.in:1.1 --- /dev/null Thu Jun 10 23:49:49 2010 +++ src/tests/util/grep/d_file_exp.in Thu Jun 10 23:49:48 2010 @@ -0,0 +1,2 @@ +-0.[24]0 +0.[35]0 Index: src/tests/util/grep/d_file_exp.out diff -u /dev/null src/tests/util/grep/d_file_exp.out:1.1 --- /dev/null Thu Jun 10 23:49:49 2010 +++ src/tests/util/grep/d_file_exp.out Thu Jun 10 23:49:48 2010 @@ -0,0 +1,6 @@ +-0.50 +-0.40 +-0.30 +-0.20 +0.30 +0.50
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pooka Date: Thu Jun 10 23:50:04 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Log Message: update To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/distrib/sets/lists/tests/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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.84 src/distrib/sets/lists/tests/mi:1.85 --- src/distrib/sets/lists/tests/mi:1.84 Thu Jun 10 22:07:33 2010 +++ src/distrib/sets/lists/tests/mi Thu Jun 10 23:50:04 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.84 2010/06/10 22:07:33 pooka Exp $ +# $NetBSD: mi,v 1.85 2010/06/10 23:50:04 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -1234,7 +1234,9 @@ ./usr/tests/util/grep/d_context_c.out tests-util-tests ./usr/tests/util/grep/d_context_d.out tests-util-tests ./usr/tests/util/grep/d_egrep.out tests-util-tests -./usr/tests/util/grep/d_file_exp.inout tests-util-tests +./usr/tests/util/grep/d_file_exp.in tests-util-tests +./usr/tests/util/grep/d_file_exp.out tests-util-tests +./usr/tests/util/grep/d_file_exp.inout tests-obsolete obsolete ./usr/tests/util/grep/d_ignore_case.out tests-util-tests ./usr/tests/util/grep/d_input tests-util-tests ./usr/tests/util/grep/d_invert.in tests-util-tests