Received: by mail.netbsd.org (Postfix, from userid 605) id E688984E24; Wed, 1 Jan 2020 23:15:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6B3C884DD4 for ; Wed, 1 Jan 2020 23:15:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id z7ZyxW5VPVTj for ; Wed, 1 Jan 2020 23:15:25 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 040BD84D8C for ; Wed, 1 Jan 2020 23:15:24 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id EC4C2FA97; Wed, 1 Jan 2020 23:15:24 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 1 Jan 2020 23:15:24 +0000 From: "Jason R Thorpe" Subject: CVS commit: src/sys/kern To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200101231524.EC4C2FA97@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Jason R Thorpe" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: thorpej Date: Wed Jan 1 23:15:24 UTC 2020 Modified Files: src/sys/kern: kern_todr.c Log Message: Now that we know if we're shutting down, enable locking in resettodr(). In the shutting_down case, we acquire the todr_mutex as a trylock. Under most circumstances, this lock will be uncontended. But if we happen to panic while accessing the TOD clock (via clock_settime() or whatever), then trylock will prevent us from getting stuck (and a warning will be displayed on the console). To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/kern/kern_todr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.