CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Wed Jan 13 07:36:56 UTC 2021 Modified Files: src/sys/kern: kern_lwp.c kgdb_stub.c Log Message: Improve English in comments To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.29 -r1.30 src/sys/kern/kgdb_stub.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_lwp.c diff -u src/sys/kern/kern_lwp.c:1.242 src/sys/kern/kern_lwp.c:1.243 --- src/sys/kern/kern_lwp.c:1.242 Mon Jun 22 16:21:29 2020 +++ src/sys/kern/kern_lwp.c Wed Jan 13 07:36:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.242 2020/06/22 16:21:29 maxv Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.243 2021/01/13 07:36:56 skrll Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020 @@ -196,7 +196,7 @@ * * sleepq -> turnstile -> spc_lwplock -> spc_mutex * - * Each process has an scheduler state lock (proc::p_lock), and a + * Each process has a scheduler state lock (proc::p_lock), and a * number of counters on LWPs and their states: p_nzlwps, p_nrlwps, and * so on. When an LWP is to be entered into or removed from one of the * following states, p_lock must be held and the process wide counters @@ -217,7 +217,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.242 2020/06/22 16:21:29 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.243 2021/01/13 07:36:56 skrll Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" Index: src/sys/kern/kgdb_stub.c diff -u src/sys/kern/kgdb_stub.c:1.29 src/sys/kern/kgdb_stub.c:1.30 --- src/sys/kern/kgdb_stub.c:1.29 Fri Jun 26 14:26:38 2015 +++ src/sys/kern/kgdb_stub.c Wed Jan 13 07:36:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_stub.c,v 1.29 2015/06/26 14:26:38 christos Exp $ */ +/* $NetBSD: kgdb_stub.c,v 1.30 2021/01/13 07:36:56 skrll Exp $ */ /* * Copyright (c) 1990, 1993 @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.29 2015/06/26 14:26:38 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.30 2021/01/13 07:36:56 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -164,7 +164,7 @@ digit2i(u_char c) /* * Convert the low 4 bits of an integer into - * an hex digit. + * a hex digit. */ static u_char i2digit(int n) @@ -173,7 +173,7 @@ i2digit(int n) } /* - * Convert a byte array into an hex string. + * Convert a byte array into a hex string. */ static void mem2hex(void *vdst, void *vsrc, int len) @@ -189,7 +189,7 @@ mem2hex(void *vdst, void *vsrc, int len) } /* - * Convert an hex string into a byte array. + * Convert a hex string into a byte array. * This returns a pointer to the character following * the last valid hex digit. If the string ends in * the middle of a byte, NULL is returned. @@ -213,7 +213,7 @@ hex2mem(void *vdst, u_char *src, int max } /* - * Convert an hex string into an integer. + * Convert a hex string into an integer. * This returns a pointer to the character following * the last valid hex digit. */
CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Wed Jan 13 07:34:37 UTC 2021 Modified Files: src/sys/kern: kern_threadpool.c Log Message: Improve english in a comment To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/kern/kern_threadpool.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_threadpool.c diff -u src/sys/kern/kern_threadpool.c:1.21 src/sys/kern/kern_threadpool.c:1.22 --- src/sys/kern/kern_threadpool.c:1.21 Wed Jan 13 02:20:15 2021 +++ src/sys/kern/kern_threadpool.c Wed Jan 13 07:34:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_threadpool.c,v 1.21 2021/01/13 02:20:15 riastradh Exp $ */ +/* $NetBSD: kern_threadpool.c,v 1.22 2021/01/13 07:34:37 skrll Exp $ */ /*- * Copyright (c) 2014, 2018 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ * Thread pools. * * A thread pool is a collection of worker threads idle or running - * jobs, together with an dispatcher thread that does not run jobs but + * jobs, together with a dispatcher thread that does not run jobs but * can be given jobs to assign to a worker thread. Scheduling a job in * a thread pool does not allocate or even sleep at all, except perhaps * on an adaptive lock, unlike kthread_create. Jobs reuse threads, so @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.21 2021/01/13 02:20:15 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.22 2021/01/13 07:34:37 skrll Exp $"); #include #include
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: skrll Date: Wed Jan 13 06:44:55 UTC 2021 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: skip sigbus_adraln on MIPS To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/tests/lib/libc/gen/t_siginfo.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/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.44 src/tests/lib/libc/gen/t_siginfo.c:1.45 --- src/tests/lib/libc/gen/t_siginfo.c:1.44 Mon Jan 11 07:17:49 2021 +++ src/tests/lib/libc/gen/t_siginfo.c Wed Jan 13 06:44:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.44 2021/01/11 07:17:49 skrll Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.45 2021/01/13 06:44:55 skrll Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -483,7 +483,7 @@ ATF_TC_BODY(sigbus_adraln, tc) #if defined(__mips__) /* no way of detecting if on GXemul, so disable everywhere for now */ - atf_tc_expect_fail("GXemul fails to trap unaligned accesses with " + atf_tc_skip("GXemul fails to trap unaligned accesses with " "correct ENTRYHI"); #endif
CVS commit: src/sys/arch/hpcmips/vr
Module Name:src Committed By: skrll Date: Wed Jan 13 06:39:47 UTC 2021 Modified Files: src/sys/arch/hpcmips/vr: vraiu.c Log Message: Don't advertise AUDIO_PROP_CAPTURE - no capture method is provided [ 1.000] audio0 at vraiu0: missing capture method To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hpcmips/vr/vraiu.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/hpcmips/vr/vraiu.c diff -u src/sys/arch/hpcmips/vr/vraiu.c:1.19 src/sys/arch/hpcmips/vr/vraiu.c:1.20 --- src/sys/arch/hpcmips/vr/vraiu.c:1.19 Sun Feb 23 04:02:46 2020 +++ src/sys/arch/hpcmips/vr/vraiu.c Wed Jan 13 06:39:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vraiu.c,v 1.19 2020/02/23 04:02:46 isaki Exp $ */ +/* $NetBSD: vraiu.c,v 1.20 2021/01/13 06:39:46 skrll Exp $ */ /* * Copyright (c) 2001 HAMAJIMA Katsuomi. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vraiu.c,v 1.19 2020/02/23 04:02:46 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vraiu.c,v 1.20 2021/01/13 06:39:46 skrll Exp $"); #include #include @@ -493,7 +493,7 @@ vraiu_get_props(void *self) { DPRINTFN(3, ("vraiu_get_props\n")); - return AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE; + return AUDIO_PROP_PLAYBACK; } void
CVS commit: src/share/man/man7
Module Name:src Committed By: riastradh Date: Wed Jan 13 05:21:34 UTC 2021 Modified Files: src/share/man/man7: entropy.7 Log Message: entropy(7): Add missing URL to reference. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man7/entropy.7 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/man7/entropy.7 diff -u src/share/man/man7/entropy.7:1.1 src/share/man/man7/entropy.7:1.2 --- src/share/man/man7/entropy.7:1.1 Sun Jan 10 23:24:26 2021 +++ src/share/man/man7/entropy.7 Wed Jan 13 05:21:34 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: entropy.7,v 1.1 2021/01/10 23:24:26 riastradh Exp $ +.\" $NetBSD: entropy.7,v 1.2 2021/01/13 05:21:34 riastradh Exp $ .\" .\" Copyright (c) 2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -232,6 +232,7 @@ create new ones before allowing anyone t .%I Debian Security Advisory .%O DSA-1571-1 .%D 2008-05-13 +.%U https://www.debian.org/security/2008/dsa-1571.html .Re .Rs .%T Features/VirtIORNG
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jan 13 02:20:15 UTC 2021 Modified Files: src/sys/kern: kern_threadpool.c Log Message: threadpool(9): Tidy up thread naming. - `dispatcher', not `overseer' -- much more appropriate metaphor. - Just omit `/-1' from unbound thread names. - Just omit `@-1' from dynamic-priority (PRI_NONE) thread names. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/kern/kern_threadpool.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_threadpool.c diff -u src/sys/kern/kern_threadpool.c:1.20 src/sys/kern/kern_threadpool.c:1.21 --- src/sys/kern/kern_threadpool.c:1.20 Wed Jan 13 02:19:08 2021 +++ src/sys/kern/kern_threadpool.c Wed Jan 13 02:20:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_threadpool.c,v 1.20 2021/01/13 02:19:08 riastradh Exp $ */ +/* $NetBSD: kern_threadpool.c,v 1.21 2021/01/13 02:20:15 riastradh Exp $ */ /*- * Copyright (c) 2014, 2018 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ * Thread pools. * * A thread pool is a collection of worker threads idle or running - * jobs, together with an overseer thread that does not run jobs but + * jobs, together with an dispatcher thread that does not run jobs but * can be given jobs to assign to a worker thread. Scheduling a job in * a thread pool does not allocate or even sleep at all, except perhaps * on an adaptive lock, unlike kthread_create. Jobs reuse threads, so @@ -56,32 +56,32 @@ * CPU. When you're done, call threadpool_percpu_put(pool_percpu, * pri). * - * +--MACHINE---+ - * | +--CPU 0---+ +--CPU 1---+ +--CPU n---+ | - * | | | | | ... | | | - * | | | | | ... | | | - * | | | | | ... | | | - * | | .| | .| ... | .| | - * | | .| | .| ... | .| | - * | | .| | .| ... | .| | - * | +--+ +--+ +--+ | - * |+--unbound-+| - * |||| - * || || - * || || - * |+--+| - * ++ + * +--MACHINE-+ + * | +--CPU 0-+ +--CPU 1-+ +--CPU n-+ | + * | | | | | ... | | | + * | | | || ... | | | + * | || || ... | | | + * | | . | | . | ... | . | | + * | | . | | . | ... | . | | + * | | . | | . | ... | . | | + * | ++ ++ ++ | + * |+--unbound---+| + * |||| + * || || + * |||| + * |++| + * +--+ * - * XXX Why one overseer per CPU? I did that originally to avoid + * XXX Why one dispatcher per CPU? I did that originally to avoid * touching remote CPUs' memory when scheduling a job, but that still * requires interprocessor synchronization. Perhaps we could get by - * with a single overseer thread, at the expense of another pointer in - * struct threadpool_job to identify the CPU on which it must run - * in order for the overseer to schedule it correctly. + * with a single dispatcher thread, at the expense of another pointer + * in struct threadpool_job to identify the CPU on which it must run in + * order for the dispatcher to schedule it correctly. */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.20 2021/01/13 02:19:08 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.21 2021/01/13 02:20:15 riastradh Exp $"); #include #include @@ -141,27 +141,27 @@ SDT_PROBE_DEFINE2(sdt, kernel, threadpoo "struct threadpool *"/*pool*/, "struct threadpool_job *"/*job*/); SDT_PROBE_DEFINE2(sdt, kernel, threadpool, schedule__job__running, "struct threadpool *"/*pool*/, "struct threadpool_job *"/*job*/); -SDT_PROBE_DEFINE2(sdt, kernel, threadpool, schedule__job__overseer, +SDT_PROBE_DEFINE2(sdt, kernel, threadpool, schedule__job__dispatcher, "struct threadpool *"/*pool*/, "struct threadpool_job *"/*job*/); SDT_PROBE_DEFINE3(sdt, kernel, threadpool, schedule__job__thread, "struct threadpool *"/*pool*/, "struct threadpool_job *"/*job*/, "struct lwp *"/*thread*/); -SDT_PROBE_DEFINE1(sdt, kernel, threadpool, overseer__start, +SDT_PROBE_DEFINE1(sdt, kernel, threadpo
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jan 13 02:19:09 UTC 2021 Modified Files: src/sys/kern: kern_threadpool.c Log Message: threadpool(9): Make threadpool_percpu_ref_remote non-sleepable. Needed for threadpool-based workqueue_enqueue to run in interrupt context. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/kern/kern_threadpool.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_threadpool.c diff -u src/sys/kern/kern_threadpool.c:1.19 src/sys/kern/kern_threadpool.c:1.20 --- src/sys/kern/kern_threadpool.c:1.19 Mon Sep 7 01:08:27 2020 +++ src/sys/kern/kern_threadpool.c Wed Jan 13 02:19:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_threadpool.c,v 1.19 2020/09/07 01:08:27 riastradh Exp $ */ +/* $NetBSD: kern_threadpool.c,v 1.20 2021/01/13 02:19:08 riastradh Exp $ */ /*- * Copyright (c) 2014, 2018 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.19 2020/09/07 01:08:27 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.20 2021/01/13 02:19:08 riastradh Exp $"); #include #include @@ -644,10 +644,16 @@ threadpool_percpu_ref_remote(struct thre { struct threadpool **poolp, *pool; - percpu_traverse_enter(); + /* + * As long as xcalls are blocked -- e.g., by kpreempt_disable + * -- the percpu object will not be swapped and destroyed. We + * can't write to it, because the data may have already been + * moved to a new buffer, but we can safely read from it. + */ + kpreempt_disable(); poolp = percpu_getptr_remote(pool_percpu->tpp_percpu, ci); pool = *poolp; - percpu_traverse_exit(); + kpreempt_enable(); return pool; }
CVS commit: src/usr.bin/xlint
Module Name:src Committed By: rillig Date: Tue Jan 12 21:48:10 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: main1.c src/usr.bin/xlint/lint2: main2.c Log Message: lint: update usage for lint1 and lint2 (Forgotten in the previous commit.) To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.bin/xlint/lint1/main1.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/lint2/main2.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.bin/xlint/lint1/main1.c diff -u src/usr.bin/xlint/lint1/main1.c:1.34 src/usr.bin/xlint/lint1/main1.c:1.35 --- src/usr.bin/xlint/lint1/main1.c:1.34 Tue Jan 12 20:42:01 2021 +++ src/usr.bin/xlint/lint1/main1.c Tue Jan 12 21:48:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main1.c,v 1.34 2021/01/12 20:42:01 rillig Exp $ */ +/* $NetBSD: main1.c,v 1.35 2021/01/12 21:48:10 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: main1.c,v 1.34 2021/01/12 20:42:01 rillig Exp $"); +__RCSID("$NetBSD: main1.c,v 1.35 2021/01/12 21:48:10 rillig Exp $"); #endif #include @@ -283,7 +283,7 @@ static void usage(void) { (void)fprintf(stderr, - "Usage: %s [-abcdeghmprstuvwyzFS] [-X [,]... src dest\n", + "Usage: %s [-abcdeghmprstuvwyzFST] [-X [,]... src dest\n", getprogname()); exit(1); } Index: src/usr.bin/xlint/lint2/main2.c diff -u src/usr.bin/xlint/lint2/main2.c:1.11 src/usr.bin/xlint/lint2/main2.c:1.12 --- src/usr.bin/xlint/lint2/main2.c:1.11 Tue Jan 12 20:42:01 2021 +++ src/usr.bin/xlint/lint2/main2.c Tue Jan 12 21:48:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main2.c,v 1.11 2021/01/12 20:42:01 rillig Exp $ */ +/* $NetBSD: main2.c,v 1.12 2021/01/12 21:48:10 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: main2.c,v 1.11 2021/01/12 20:42:01 rillig Exp $"); +__RCSID("$NetBSD: main2.c,v 1.12 2021/01/12 21:48:10 rillig Exp $"); #endif #include @@ -191,6 +191,6 @@ static void usage(void) { (void)fprintf(stderr, - "usage: lint2 -hpstxuHF -Clib -l lib ... src1 ...\n"); + "usage: lint2 -hpstxuHFT -Clib -l lib ... src1 ...\n"); exit(1); }
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Jan 12 20:42:01 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict.exp src/usr.bin/xlint/common: externs.h src/usr.bin/xlint/lint1: cgram.y err.c externs1.h func.c main1.c op.h oper.c ops.def tree.c src/usr.bin/xlint/lint2: main2.c src/usr.bin/xlint/xlint: lint.1 xlint.c Added Files: src/tests/usr.bin/xlint: check-expect.lua Log Message: lint: add new check for strict bool mode In strict bool mode, bool is considered incompatible with all other scalar types, just as in Java, C#, Pascal. The controlling expressions in if statements, while loops, for loops and the '?:' operator must be of type bool. The logical operators work on bool instead of int, the bitwise operators accept both integer and bool. The arithmetic operators don't accept bool. Since implements bool using C preprocessor macros instead of predefining the identifiers "true" and "false", the integer constants 0 and 1 may be used in all contexts that require a bool expression. Except from these, no implicit conversion between bool and scalar types is allowed. See usr.bin/tests/xlint/lint1/d_c99_bool_strict.c for more details. The command line option -T has been chosen because all obvious choices (-b or -B for bool, -s or -S for strict) are already in use. The -T may stand for "types are checked strictly". The default behavior of lint doesn't change. The strict bool check is purely optional. An example program for strict bool mode is usr.bin/make, which has been using explicit comparisons such as p != NULL, ch != '\0' or n > 0 in most places for a long time now, even before the refactoring in 2020. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/check-expect.lua cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp cvs rdiff -u -r1.12 -r1.13 src/usr.bin/xlint/common/externs.h cvs rdiff -u -r1.138 -r1.139 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.65 -r1.66 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.54 -r1.55 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.56 -r1.57 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.33 -r1.34 src/usr.bin/xlint/lint1/main1.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/lint1/op.h cvs rdiff -u -r1.2 -r1.3 src/usr.bin/xlint/lint1/oper.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/lint1/ops.def cvs rdiff -u -r1.150 -r1.151 src/usr.bin/xlint/lint1/tree.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/lint2/main2.c cvs rdiff -u -r1.41 -r1.42 src/usr.bin/xlint/xlint/lint.1 cvs rdiff -u -r1.52 -r1.53 src/usr.bin/xlint/xlint/xlint.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/usr.bin/xlint/lint1/d_c99_bool_strict.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.3 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.4 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.3 Mon Jan 11 00:28:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Tue Jan 12 20:42:01 2021 @@ -1,9 +1,9 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.3 2021/01/11 00:28:28 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.4 2021/01/12 20:42:01 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* - * Experimental feature: allow to treat _Bool as incompatible with all - * scalar types. This means: + * The option -T treats _Bool as incompatible with all other scalar types. + * This means: * * SB001: Controlling expressions in 'if', 'while', 'for', '?:' must be of * type _Bool instead of scalar. @@ -18,9 +18,9 @@ * * SB005: There is no implicit conversion from _Bool to any other type. * - * SB006: A constant integer expression is compatible with type _Bool if - * it is an integer constant with value 0 or 1, or if the result type of - * its main operator is _Bool. + * SB006: An expression is compatible with type _Bool if its main operator + * returns type _Bool, or if the expression is an integer constant expression + * with value 0 or 1. * * SB007: Expressions like "flags & FLAG" are compatible with _Bool if * they appear in a context where they are immediately compared to zero. @@ -32,7 +32,7 @@ * typically have type _Bool:1 and can be converted to _Bool and back. */ -// Not yet implemented: /* lint1-extra-flags: -T */ +/* lint1-extra-flags: -T */ /* * The header defines the macros bool = _Bool, false = 0 and @@ -61,23 +61,23 @@ SB001_controlling_expression(bool b, int return; /* Not allowed: 2 is not a boolean expression. */ - if (/*CONSTCOND*/2) + if (/*CONSTCOND*/2) /* expect: 333 */ return; /* Not allowed: There is no implicit conversion from scalar to bool. */ - if (i) + if (i) /* expect: 333 */ return; if (i != 0) return; /* Not allowed: There is
CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Tue Jan 12 19:36:39 UTC 2021 Modified Files: src/sys/kern: subr_pcq.c Log Message: Typo in comment To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/kern/subr_pcq.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/subr_pcq.c diff -u src/sys/kern/subr_pcq.c:1.11 src/sys/kern/subr_pcq.c:1.12 --- src/sys/kern/subr_pcq.c:1.11 Mon Dec 16 18:50:44 2019 +++ src/sys/kern/subr_pcq.c Tue Jan 12 19:36:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pcq.c,v 1.11 2019/12/16 18:50:44 ad Exp $ */ +/* $NetBSD: subr_pcq.c,v 1.12 2021/01/12 19:36:39 skrll Exp $ */ /*- * Copyright (c) 2009, 2019 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.11 2019/12/16 18:50:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.12 2021/01/12 19:36:39 skrll Exp $"); #include #include @@ -180,7 +180,7 @@ pcq_get(pcq_t *pcq) /* * Ensure that update to pcq_items[] becomes globally visible - * before the update to pcq_pc. If it were reodered to occur + * before the update to pcq_pc. If it were reordered to occur * after it, we could in theory wipe out a modification made * to pcq_items[] by pcq_put(). */
CVS commit: src/usr.bin/nbperf
Module Name:src Committed By: joerg Date: Tue Jan 12 14:21:18 UTC 2021 Modified Files: src/usr.bin/nbperf: nbperf.c Log Message: Don't use arc4random for the tools build on NetBSD either. compat_defs.h explicitly forces _POSIX_SOURCE and this hides the prototype in stdlib.h. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/nbperf/nbperf.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.bin/nbperf/nbperf.c diff -u src/usr.bin/nbperf/nbperf.c:1.6 src/usr.bin/nbperf/nbperf.c:1.7 --- src/usr.bin/nbperf/nbperf.c:1.6 Thu Jan 7 16:03:08 2021 +++ src/usr.bin/nbperf/nbperf.c Tue Jan 12 14:21:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf.c,v 1.6 2021/01/07 16:03:08 joerg Exp $ */ +/* $NetBSD: nbperf.c,v 1.7 2021/01/12 14:21:18 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: nbperf.c,v 1.6 2021/01/07 16:03:08 joerg Exp $"); +__RCSID("$NetBSD: nbperf.c,v 1.7 2021/01/12 14:21:18 joerg Exp $"); #include #include @@ -62,7 +62,7 @@ void usage(void) exit(1); } -#if HAVE_NBTOOL_CONFIG_H && !defined(__NetBSD__) +#if HAVE_NBTOOL_CONFIG_H #define arc4random() rand() #endif
CVS commit: src/sys/arch/hpcmips/conf
Module Name:src Committed By: skrll Date: Tue Jan 12 08:03:19 UTC 2021 Modified Files: src/sys/arch/hpcmips/conf: GENERIC Log Message: Turn on DIAGNOSTIC to help track down problem in hpcmips test runs To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/arch/hpcmips/conf/GENERIC 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/hpcmips/conf/GENERIC diff -u src/sys/arch/hpcmips/conf/GENERIC:1.243 src/sys/arch/hpcmips/conf/GENERIC:1.244 --- src/sys/arch/hpcmips/conf/GENERIC:1.243 Sat Aug 1 08:20:49 2020 +++ src/sys/arch/hpcmips/conf/GENERIC Tue Jan 12 08:03:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.243 2020/08/01 08:20:49 maxv Exp $ +# $NetBSD: GENERIC,v 1.244 2021/01/12 08:03:19 skrll Exp $ # # GENERIC machine description file # @@ -24,7 +24,7 @@ include "arch/hpcmips/conf/std.hpcmips. options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.243 $" +#ident "GENERIC-$Revision: 1.244 $" maxusers 16 @@ -47,7 +47,7 @@ options DDB # in-kernel debugger #options DDB_ONPANIC=0 # don't enter debugger on panic options DDB_HISTORY_SIZE=512 # enable history editing in DDB #options KGDB # remote debugger -#options DIAGNOSTIC # extra kernel debugging checks +options DIAGNOSTIC # extra kernel debugging checks #options DEBUG # extra kernel debugging support options KTRACE # system call tracing support options MSGBUFSIZE=8192 # dmesg buffer size