Module Name: src
Committed By: dogcow
Date: Tue Feb 11 06:09:48 UTC 2020
Modified Files:
src/sys/kern: kern_lwp.c
Log Message:
fix compilation failure for arches without l_pcu_valid
ok riastradh
To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/kern/kern_lwp.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.224 src/sys/kern/kern_lwp.c:1.225
--- src/sys/kern/kern_lwp.c:1.224 Tue Feb 11 03:14:49 2020
+++ src/sys/kern/kern_lwp.c Tue Feb 11 06:09:48 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lwp.c,v 1.224 2020/02/11 03:14:49 riastradh Exp $ */
+/* $NetBSD: kern_lwp.c,v 1.225 2020/02/11 06:09:48 dogcow Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020
@@ -211,7 +211,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.224 2020/02/11 03:14:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.225 2020/02/11 06:09:48 dogcow Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@@ -890,7 +890,9 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_
* the MD cpu_lwp_fork() can copy the saved state to the new LWP.
*/
pcu_save_all(l1);
+#if PCU_UNIT_COUNT > 0
l2->l_pcu_valid = l1->l_pcu_valid;
+#endif
uvm_lwp_setuarea(l2, uaddr);
uvm_lwp_fork(l1, l2, stack, stacksize, func, (arg != NULL) ? arg : l2);