Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern timecounter(9): Zero the next pointer after tc_detach.
details: https://anonhg.NetBSD.org/src/rev/fc1fb3317dcb
branches: trunk
changeset: 1021518:fc1fb3317dcb
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jun 02 21:34:58 2021 +0000
description:
timecounter(9): Zero the next pointer after tc_detach.
This reverts it to a state where tc_init works again.
diffstat:
sys/kern/kern_tc.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 722e26fdab88 -r fc1fb3317dcb sys/kern/kern_tc.c
--- a/sys/kern/kern_tc.c Wed Jun 02 17:56:40 2021 +0000
+++ b/sys/kern/kern_tc.c Wed Jun 02 21:34:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.61 2021/04/08 06:20:47 simonb Exp $ */
+/* $NetBSD: kern_tc.c,v 1.62 2021/06/02 21:34:58 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */
-__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.61 2021/04/08 06:20:47 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.62 2021/06/02 21:34:58 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ntp.h"
@@ -698,10 +698,13 @@
* before retrying.
*/
if (l == NULL) {
- return 0;
+ break;
}
(void)kpause("tcdetach", false, mstohz(10), NULL);
}
+
+ tc->tc_next = NULL;
+ return 0;
}
/* Report the frequency of the current timecounter. */
Home |
Main Index |
Thread Index |
Old Index