Module Name:    src
Committed By:   skrll
Date:           Sat Feb 25 08:30:31 UTC 2023

Modified Files:
        src/sys/arch/hppa/hppa: vm_machdep.c

Log Message:
Convert some assignments into KASSERTs.

l_md is zeroised by lwp_create with

         memset(&l2->l_startzero, 0, sizeof(*l2) -
                    offsetof(lwp_t, l_startzero));


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hppa/hppa/vm_machdep.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/hppa/hppa/vm_machdep.c
diff -u src/sys/arch/hppa/hppa/vm_machdep.c:1.57 src/sys/arch/hppa/hppa/vm_machdep.c:1.58
--- src/sys/arch/hppa/hppa/vm_machdep.c:1.57	Thu Sep 29 06:39:59 2022
+++ src/sys/arch/hppa/hppa/vm_machdep.c	Sat Feb 25 08:30:31 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.57 2022/09/29 06:39:59 skrll Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.58 2023/02/25 08:30:31 skrll Exp $	*/
 
 /*	$OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.57 2022/09/29 06:39:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.58 2023/02/25 08:30:31 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -96,8 +96,8 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	pcb1 = lwp_getpcb(l1);
 	pcb2 = lwp_getpcb(l2);
 
-	l2->l_md.md_astpending = 0;
-	l2->l_md.md_flags = 0;
+	KASSERT(l2->l_md.md_astpending == 0);
+	KASSERT(l2->l_md.md_flags == 0);
 
 	/* Flush the parent LWP out of the FPU. */
 	hppa_fpu_flush(l1);

Reply via email to