CVS commit: src/sys/sys

2024-05-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 18 01:21:42 UTC 2024

Modified Files:
src/sys/sys: ucontext.h

Log Message:
If  does not define __UCONTEXT_SIZE, define it as
sizeof(ucontext_t).


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/ucontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ucontext.h
diff -u src/sys/sys/ucontext.h:1.21 src/sys/sys/ucontext.h:1.22
--- src/sys/sys/ucontext.h:1.21	Sat May 18 01:16:21 2024
+++ src/sys/sys/ucontext.h	Sat May 18 01:21:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucontext.h,v 1.21 2024/05/18 01:16:21 thorpej Exp $	*/
+/*	$NetBSD: ucontext.h,v 1.22 2024/05/18 01:21:42 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2003, 2024 The NetBSD Foundation, Inc.
@@ -82,6 +82,12 @@ struct __ucontext {
 #define _UC_UCONTEXT_ALIGN (~0)
 #endif
 
+#ifdef __UCONTEXT_SIZE
+__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
+#else
+#define	__UCONTEXT_SIZE		sizeof(ucontext_t)
+#endif
+
 #ifndef _UC_TLSBASE
 #error	_UC_TLSBASE not defined.
 #endif
@@ -102,10 +108,6 @@ int	setucontext(struct lwp *, const ucon
 void	cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *);
 int	cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int);
 int	cpu_mcontext_validate(struct lwp *, const mcontext_t *);
-
-#ifdef __UCONTEXT_SIZE
-__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
-#endif
 #endif /* _KERNEL */
 
 #endif /* !_SYS_UCONTEXT_H_ */



CVS commit: src/sys/sys

2024-05-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 18 01:21:42 UTC 2024

Modified Files:
src/sys/sys: ucontext.h

Log Message:
If  does not define __UCONTEXT_SIZE, define it as
sizeof(ucontext_t).


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/ucontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 18 01:16:21 UTC 2024

Modified Files:
src/sys/sys: ucontext.h

Log Message:
Define the _UC_* flag bits before including .


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/ucontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ucontext.h
diff -u src/sys/sys/ucontext.h:1.20 src/sys/sys/ucontext.h:1.21
--- src/sys/sys/ucontext.h:1.20	Sat May 18 00:37:41 2024
+++ src/sys/sys/ucontext.h	Sat May 18 01:16:21 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucontext.h,v 1.20 2024/05/18 00:37:41 thorpej Exp $	*/
+/*	$NetBSD: ucontext.h,v 1.21 2024/05/18 01:16:21 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2003, 2024 The NetBSD Foundation, Inc.
@@ -33,24 +33,6 @@
 #define _SYS_UCONTEXT_H_
 
 #include 
-#include 
-
-typedef struct __ucontext	ucontext_t;
-
-struct __ucontext {
-	unsigned int	uc_flags;	/* properties */
-	ucontext_t * 	uc_link;	/* context to resume */
-	sigset_t	uc_sigmask;	/* signals blocked in this context */
-	stack_t		uc_stack;	/* the stack used by this context */
-	mcontext_t	uc_mcontext;	/* machine state */
-#if defined(_UC_MACHINE_PAD)
-	long		__uc_pad[_UC_MACHINE_PAD];
-#endif
-};
-
-#ifndef _UC_UCONTEXT_ALIGN
-#define _UC_UCONTEXT_ALIGN (~0)
-#endif
 
 /* uc_flags */
 #define _UC_SIGMASK	0x01		/* valid uc_sigmask */
@@ -81,6 +63,25 @@ struct __ucontext {
  *	_UC_CLRSTACK	Context does not use signal stack
  */
 
+#include 
+
+typedef struct __ucontext	ucontext_t;
+
+struct __ucontext {
+	unsigned int	uc_flags;	/* properties */
+	ucontext_t * 	uc_link;	/* context to resume */
+	sigset_t	uc_sigmask;	/* signals blocked in this context */
+	stack_t		uc_stack;	/* the stack used by this context */
+	mcontext_t	uc_mcontext;	/* machine state */
+#if defined(_UC_MACHINE_PAD)
+	long		__uc_pad[_UC_MACHINE_PAD];
+#endif
+};
+
+#ifndef _UC_UCONTEXT_ALIGN
+#define _UC_UCONTEXT_ALIGN (~0)
+#endif
+
 #ifndef _UC_TLSBASE
 #error	_UC_TLSBASE not defined.
 #endif



CVS commit: src/sys/sys

2024-05-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 18 01:16:21 UTC 2024

Modified Files:
src/sys/sys: ucontext.h

Log Message:
Define the _UC_* flag bits before including .


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/ucontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:45:13 UTC 2024

Modified Files:
src/sys/sys: lock.h

Log Message:
sys/lock.h: remove stray semicolon from SPINLOCK_BACKOFF macro


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/sys/lock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:45:13 UTC 2024

Modified Files:
src/sys/sys: lock.h

Log Message:
sys/lock.h: remove stray semicolon from SPINLOCK_BACKOFF macro


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/sys/lock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lock.h
diff -u src/sys/sys/lock.h:1.93 src/sys/sys/lock.h:1.94
--- src/sys/sys/lock.h:1.93	Sun May 12 10:34:56 2024
+++ src/sys/sys/lock.h	Sun May 12 10:45:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock.h,v 1.93 2024/05/12 10:34:56 rillig Exp $	*/
+/*	$NetBSD: lock.h,v 1.94 2024/05/12 10:45:13 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@ do {\
 	}			\
 	if ((count) < SPINLOCK_BACKOFF_MAX)			\
 		(count) += (count);\
-} while (0);
+} while (0)
 
 #ifdef LOCKDEBUG
 #define	SPINLOCK_SPINOUT(spins)		((spins)++ > 0x0fff)



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:38:03 UTC 2024

Modified Files:
src/sys/sys: module_hook.h

Log Message:
sys/module_hook.h: remove CONSTCOND comment from do-while-0 loop

Lint doesn't need this comment anymore, as there is nothing surprising
or unusual about this idiom.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/module_hook.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/module_hook.h
diff -u src/sys/sys/module_hook.h:1.6 src/sys/sys/module_hook.h:1.7
--- src/sys/sys/module_hook.h:1.6	Thu Dec 12 22:55:20 2019
+++ src/sys/sys/module_hook.h	Sun May 12 10:38:03 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: module_hook.h,v 1.6 2019/12/12 22:55:20 pgoyette Exp $	*/
+/* $NetBSD: module_hook.h,v 1.7 2024/05/12 10:38:03 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -70,14 +70,14 @@ extern struct hook ## _t {	\
 do {\
 	(hook).f = func;	\
 	module_hook_set(&(hook).hooked, &(hook).lc);		\
-} while /* CONSTCOND */ (0)
+} while (0)
 
 #define MODULE_HOOK_UNSET(hook)	\
 do {\
 	KASSERT((hook).f);	\
 	module_hook_unset(&(hook).hooked, &(hook).lc);		\
 	(hook).f = NULL;	/* paranoia */			\
-} while /* CONSTCOND */ (0)
+} while (0)
 
 #define MODULE_HOOK_CALL(hook, args, default, retval)		\
 do {\
@@ -87,7 +87,7 @@ do {\
 	} else {		\
 		(retval) = (default);\
 	}			\
-} while /* CONSTCOND */ (0)
+} while (0)
 
 #define MODULE_HOOK_CALL_VOID(hook, args, default)		\
 do {\
@@ -97,6 +97,6 @@ do {\
 	} else {		\
 		default;	\
 	}			\
-} while /* CONSTCOND */ (0)
+} while (0)
 
 #endif	/* _SYS_MODULE_HOOK_H */



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:38:03 UTC 2024

Modified Files:
src/sys/sys: module_hook.h

Log Message:
sys/module_hook.h: remove CONSTCOND comment from do-while-0 loop

Lint doesn't need this comment anymore, as there is nothing surprising
or unusual about this idiom.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/module_hook.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:34:56 UTC 2024

Modified Files:
src/sys/sys: bitops.h boot_flag.h bootblock.h buf.h cctr.h cdefs.h
cpu_data.h fd_set.h ieee754.h ipc.h kernhist.h lock.h mbuf.h msg.h
queue.h rbtree.h resourcevar.h sem.h shm.h siginfo.h sigtypes.h
socketvar.h systm.h time.h tree.h

Log Message:
sys/sys: remove CONSTCOND comment from do-while-0 loop

Lint doesn't need this comment anymore, as there is nothing surprising
or unusual about this idiom.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/bitops.h
cvs rdiff -u -r1.7 -r1.8 src/sys/sys/boot_flag.h src/sys/sys/fd_set.h
cvs rdiff -u -r1.59 -r1.60 src/sys/sys/bootblock.h
cvs rdiff -u -r1.134 -r1.135 src/sys/sys/buf.h
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/cctr.h
cvs rdiff -u -r1.162 -r1.163 src/sys/sys/cdefs.h
cvs rdiff -u -r1.55 -r1.56 src/sys/sys/cpu_data.h src/sys/sys/shm.h
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/ieee754.h
cvs rdiff -u -r1.37 -r1.38 src/sys/sys/ipc.h
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/kernhist.h
cvs rdiff -u -r1.92 -r1.93 src/sys/sys/lock.h
cvs rdiff -u -r1.239 -r1.240 src/sys/sys/mbuf.h
cvs rdiff -u -r1.29 -r1.30 src/sys/sys/msg.h
cvs rdiff -u -r1.76 -r1.77 src/sys/sys/queue.h
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/rbtree.h
cvs rdiff -u -r1.58 -r1.59 src/sys/sys/resourcevar.h
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/sem.h src/sys/sys/siginfo.h
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/sigtypes.h
cvs rdiff -u -r1.168 -r1.169 src/sys/sys/socketvar.h
cvs rdiff -u -r1.305 -r1.306 src/sys/sys/systm.h
cvs rdiff -u -r1.80 -r1.81 src/sys/sys/time.h
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/tree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:34:56 UTC 2024

Modified Files:
src/sys/sys: bitops.h boot_flag.h bootblock.h buf.h cctr.h cdefs.h
cpu_data.h fd_set.h ieee754.h ipc.h kernhist.h lock.h mbuf.h msg.h
queue.h rbtree.h resourcevar.h sem.h shm.h siginfo.h sigtypes.h
socketvar.h systm.h time.h tree.h

Log Message:
sys/sys: remove CONSTCOND comment from do-while-0 loop

Lint doesn't need this comment anymore, as there is nothing surprising
or unusual about this idiom.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/bitops.h
cvs rdiff -u -r1.7 -r1.8 src/sys/sys/boot_flag.h src/sys/sys/fd_set.h
cvs rdiff -u -r1.59 -r1.60 src/sys/sys/bootblock.h
cvs rdiff -u -r1.134 -r1.135 src/sys/sys/buf.h
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/cctr.h
cvs rdiff -u -r1.162 -r1.163 src/sys/sys/cdefs.h
cvs rdiff -u -r1.55 -r1.56 src/sys/sys/cpu_data.h src/sys/sys/shm.h
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/ieee754.h
cvs rdiff -u -r1.37 -r1.38 src/sys/sys/ipc.h
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/kernhist.h
cvs rdiff -u -r1.92 -r1.93 src/sys/sys/lock.h
cvs rdiff -u -r1.239 -r1.240 src/sys/sys/mbuf.h
cvs rdiff -u -r1.29 -r1.30 src/sys/sys/msg.h
cvs rdiff -u -r1.76 -r1.77 src/sys/sys/queue.h
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/rbtree.h
cvs rdiff -u -r1.58 -r1.59 src/sys/sys/resourcevar.h
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/sem.h src/sys/sys/siginfo.h
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/sigtypes.h
cvs rdiff -u -r1.168 -r1.169 src/sys/sys/socketvar.h
cvs rdiff -u -r1.305 -r1.306 src/sys/sys/systm.h
cvs rdiff -u -r1.80 -r1.81 src/sys/sys/time.h
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/tree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.15 src/sys/sys/bitops.h:1.16
--- src/sys/sys/bitops.h:1.15	Sun Sep 12 15:22:05 2021
+++ src/sys/sys/bitops.h	Sun May 12 10:34:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.15 2021/09/12 15:22:05 rillig Exp $	*/
+/*	$NetBSD: bitops.h,v 1.16 2024/05/12 10:34:56 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -323,7 +323,7 @@ fast_remainder32(uint32_t _v, uint32_t _
 	size_t __i;			\
 	for (__i = 0; __i < __arraycount((__v)->_b); __i++)		\
 		(__v)->_b[__i] = 0;	\
-	} while (/* CONSTCOND */ 0)
+	} while (0)
 #endif /* GCC 2.95 */
 
 #endif /* _SYS_BITOPS_H_ */

Index: src/sys/sys/boot_flag.h
diff -u src/sys/sys/boot_flag.h:1.7 src/sys/sys/boot_flag.h:1.8
--- src/sys/sys/boot_flag.h:1.7	Tue Apr 29 19:16:08 2008
+++ src/sys/sys/boot_flag.h	Sun May 12 10:34:56 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: boot_flag.h,v 1.7 2008/04/29 19:16:08 ad Exp $ */
+/* $NetBSD: boot_flag.h,v 1.8 2024/05/12 10:34:56 rillig Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -86,6 +86,6 @@
 		break;		\
 	} /* switch */		\
 \
-	} while (/* CONSTCOND */ 0)
+	} while (0)
 
 #endif /* _SYS_BOOT_FLAG_H_ */
Index: src/sys/sys/fd_set.h
diff -u src/sys/sys/fd_set.h:1.7 src/sys/sys/fd_set.h:1.8
--- src/sys/sys/fd_set.h:1.7	Sun Jun 24 12:05:40 2018
+++ src/sys/sys/fd_set.h	Sun May 12 10:34:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $	*/
+/*	$NetBSD: fd_set.h,v 1.8 2024/05/12 10:34:56 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -81,7 +81,7 @@ typedef	struct fd_set {
 	unsigned int __i;		\
 	for (__i = 0; __i < __NFD_SIZE; __i++)\
 		__fds->fds_bits[__i] = 0;\
-	} while (/* CONSTCOND */ 0)
+	} while (0)
 #endif /* GCC 2.95 */
 
 /*
@@ -100,7 +100,7 @@ typedef	struct fd_set {
 	unsigned int __i;		\
 	for (__i = 0; __i < __NFD_SIZE; __i++)\
 		__t->fds_bits[__i] = __f->fds_bits[__i];		\
-	} while (/* CONSTCOND */ 0)
+	} while (0)
 #endif /* GCC 2.95 */
 
 #endif /* _NETBSD_SOURCE */

Index: src/sys/sys/bootblock.h
diff -u src/sys/sys/bootblock.h:1.59 src/sys/sys/bootblock.h:1.60
--- src/sys/sys/bootblock.h:1.59	Sat May 11 22:10:27 2024
+++ src/sys/sys/bootblock.h	Sun May 12 10:34:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootblock.h,v 1.59 2024/05/11 22:10:27 tsutsui Exp $	*/
+/*	$NetBSD: bootblock.h,v 1.60 2024/05/12 10:34:56 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -800,7 +800,7 @@ struct alpha_boot_block {
 		_i++)		\
 			_cksum += le64toh(_bb->bb_data[_i]);		\
 		*(cksum) = htole64(_cksum);\
-	} while (/*CONSTCOND*/ 0)
+	} while (0)
 
 /* --
  * apple --

Index: src/sys/sys/buf.h
diff -u src/sys/sys/buf.h:1.134 src/sys/sys/buf.h:1.135
--- src/sys/sys/buf.h:1.134	Fri Jul 31 04:07:30 2020
+++ src/sys/sys/buf.h	Sun May 12 10:34:56 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.134 2020/07/31 04:07:30 chs Exp $ */
+/* $NetBSD: buf.h,v 1.135 2024/05/12 10:34:56 rillig Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.

CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 09:34:25 UTC 2024

Modified Files:
src/sys/sys: ktrace.h

Log Message:
sys/ktrace.h: fix off-by-one in snprintb for ktrace flags

There's a one-bit gap between TRC_EMUL and INHERIT.

Noticed by RVP.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/sys/ktrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ktrace.h
diff -u src/sys/sys/ktrace.h:1.69 src/sys/sys/ktrace.h:1.70
--- src/sys/sys/ktrace.h:1.69	Fri May 10 09:30:47 2024
+++ src/sys/sys/ktrace.h	Sun May 12 09:34:25 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ktrace.h,v 1.69 2024/05/10 09:30:47 rillig Exp $	*/
+/*	$NetBSD: ktrace.h,v 1.70 2024/05/12 09:34:25 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -265,7 +265,7 @@ struct ktr_execfd {
 "b\16MIB\0" \
 "b\17EXEC_FD\0" \
 "f\30\4VERSION\0" \
-"b\35TRC_EMUL\0" \
+"b\34TRC_EMUL\0" \
 "b\36INHERIT\0" \
 "b\37PERSISTENT\0"
 



CVS commit: src/sys/sys

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 09:34:25 UTC 2024

Modified Files:
src/sys/sys: ktrace.h

Log Message:
sys/ktrace.h: fix off-by-one in snprintb for ktrace flags

There's a one-bit gap between TRC_EMUL and INHERIT.

Noticed by RVP.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/sys/ktrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May 11 13:26:54 UTC 2024

Modified Files:
src/sys/sys: cdefs.h

Log Message:
sys/cdefs.h: Make various macros work more robustly.

Use predefined __-namespace macros inside __BIT, __type_min,
__type_max, and __type_fit:

- Use __CHAR_BIT__ instead of NBBY so this works without sys/types.h
  and without _NETBSD_SOURCE.

- Use __INTMAX_TYPE__, __UINTMAX_TYPE__ instead of intmax_t, uintmax_t
  so this works without stdint.h.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/sys/cdefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.161 src/sys/sys/cdefs.h:1.162
--- src/sys/sys/cdefs.h:1.161	Wed May  1 07:43:41 2024
+++ src/sys/sys/cdefs.h	Sat May 11 13:26:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.161 2024/05/01 07:43:41 rillig Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.162 2024/05/11 13:26:54 riastradh Exp $	*/
 
 /* * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -645,9 +645,12 @@
 
 #ifndef __ASSEMBLER__
 /* __BIT(n): nth bit, where __BIT(0) == 0x1. */
-#define	__BIT(__n)	\
-(((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : \
-((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1
+#define	__BIT(__n)			  \
+	(((__UINTMAX_TYPE__)(__n) >= __CHAR_BIT__ * sizeof(__UINTMAX_TYPE__)) \
+	? 0  \
+	: ((__UINTMAX_TYPE__)1 <<	  \
+		(__UINTMAX_TYPE__)((__n) &  \
+		(__CHAR_BIT__ * sizeof(__UINTMAX_TYPE__) - 1
 
 /* __MASK(n): first n bits all set, where __MASK(4) == 0b. */
 #define	__MASK(__n)	(__BIT(__n) - 1)
@@ -720,8 +723,8 @@
  */
 #define	__MACROUSE(e)	(/*LINTED*/(void)sizeof((long)(e)))
 
-#define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \
-(~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL)
+#define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(__INTMAX_TYPE__) ? \
+(~((1ULL << (sizeof(t) * __CHAR_BIT__)) - 1)) : 0ULL)
 
 #ifndef __ASSEMBLER__
 static __inline long long __zeroll(void) { return 0; }
@@ -733,8 +736,8 @@ static __inline unsigned long long __zer
 
 #define __negative_p(x) (!((x) > 0) && ((x) != 0))
 
-#define __type_min_s(t) ((t)((1ULL << (sizeof(t) * NBBY - 1
-#define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * NBBY - 1
+#define __type_min_s(t) ((t)((1ULL << (sizeof(t) * __CHAR_BIT__ - 1
+#define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * __CHAR_BIT__ - 1
 #define __type_min_u(t) ((t)0ULL)
 #define __type_max_u(t) ((t)~0ULL)
 #define __type_is_signed(t) (/*LINTED*/__type_min_s(t) + (t)1 < (t)1)
@@ -742,13 +745,18 @@ static __inline unsigned long long __zer
 #define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u(t))
 
 
-#define __type_fit_u(t, a) (/*LINTED*/!__negative_p(a) && \
-(uintmax_t)((a) + __zeroull()) <= (uintmax_t)__type_max_u(t))
-
-#define __type_fit_s(t, a) (/*LINTED*/__negative_p(a) ? \
-((intmax_t)((a) + __zeroll()) >= (intmax_t)__type_min_s(t)) : \
-((intmax_t)((a) + __zeroll()) >= (intmax_t)0 && \
- (intmax_t)((a) + __zeroll()) <= (intmax_t)__type_max_s(t)))
+#define __type_fit_u(t, a)		  \
+	(/*LINTED*/!__negative_p(a) &&	  \
+	((__UINTMAX_TYPE__)((a) + __zeroull()) <=			  \
+		(__UINTMAX_TYPE__)__type_max_u(t)))
+
+#define __type_fit_s(t, a)		  \
+	(/*LINTED*/__negative_p(a)	  \
+	? ((__INTMAX_TYPE__)((a) + __zeroll()) >=			  \
+		(__INTMAX_TYPE__)__type_min_s(t))			  \
+	: ((__INTMAX_TYPE__)((a) + __zeroll()) >= (__INTMAX_TYPE__)0 &&   \
+		((__INTMAX_TYPE__)((a) + __zeroll()) <=			  \
+		(__INTMAX_TYPE__)__type_max_s(t
 
 /*
  * return true if value 'a' fits in type 't'



CVS commit: src/sys/sys

2024-05-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May 11 13:26:54 UTC 2024

Modified Files:
src/sys/sys: cdefs.h

Log Message:
sys/cdefs.h: Make various macros work more robustly.

Use predefined __-namespace macros inside __BIT, __type_min,
__type_max, and __type_fit:

- Use __CHAR_BIT__ instead of NBBY so this works without sys/types.h
  and without _NETBSD_SOURCE.

- Use __INTMAX_TYPE__, __UINTMAX_TYPE__ instead of intmax_t, uintmax_t
  so this works without stdint.h.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/sys/cdefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri May 10 09:30:47 UTC 2024

Modified Files:
src/sys/sys: ktrace.h

Log Message:
sys/ktrace.h: fix off-by-one error in snprintb for ktrace flags


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/sys/ktrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ktrace.h
diff -u src/sys/sys/ktrace.h:1.68 src/sys/sys/ktrace.h:1.69
--- src/sys/sys/ktrace.h:1.68	Wed Jun 29 22:10:43 2022
+++ src/sys/sys/ktrace.h	Fri May 10 09:30:47 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ktrace.h,v 1.68 2022/06/29 22:10:43 riastradh Exp $	*/
+/*	$NetBSD: ktrace.h,v 1.69 2024/05/10 09:30:47 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -265,9 +265,9 @@ struct ktr_execfd {
 "b\16MIB\0" \
 "b\17EXEC_FD\0" \
 "f\30\4VERSION\0" \
-"b\36TRC_EMUL\0" \
-"b\37INHERIT\0" \
-"b\40PERSISTENT\0"
+"b\35TRC_EMUL\0" \
+"b\36INHERIT\0" \
+"b\37PERSISTENT\0"
 
 /*
  * trace flags (also in p_traceflags)



CVS commit: src/sys/sys

2024-05-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri May 10 09:30:47 UTC 2024

Modified Files:
src/sys/sys: ktrace.h

Log Message:
sys/ktrace.h: fix off-by-one error in snprintb for ktrace flags


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/sys/ktrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed May  1 07:43:42 UTC 2024

Modified Files:
src/sys/sys: cdefs.h

Log Message:
sys/cdefs.h: pass __aligned to lint

Lint could parse _Alignas and __attribute__((__aligned__(4))) previously
but simply ignored them. Since today, they affect the layout of struct
and union.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/sys/cdefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-05-01 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed May  1 07:43:42 UTC 2024

Modified Files:
src/sys/sys: cdefs.h

Log Message:
sys/cdefs.h: pass __aligned to lint

Lint could parse _Alignas and __attribute__((__aligned__(4))) previously
but simply ignored them. Since today, they affect the layout of struct
and union.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/sys/cdefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.160 src/sys/sys/cdefs.h:1.161
--- src/sys/sys/cdefs.h:1.160	Sun Apr 30 08:45:48 2023
+++ src/sys/sys/cdefs.h	Wed May  1 07:43:41 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.160 2023/04/30 08:45:48 riastradh Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.161 2024/05/01 07:43:41 rillig Exp $	*/
 
 /* * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -451,7 +451,7 @@
 #if defined(__lint__)
 #define __thread	/* delete */
 #define	__packed	__packed
-#define	__aligned(x)	/* delete */
+#define	__aligned(x)	_Alignas((x))
 #define	__section(x)	/* delete */
 #elif __GNUC_PREREQ__(2, 7) || defined(__PCC__) || defined(__lint__)
 #define	__packed	__attribute__((__packed__))



CVS commit: src/sys/sys

2024-04-17 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Apr 17 18:01:29 UTC 2024

Modified Files:
src/sys/sys: conf.h

Log Message:
sys/conf.h: Need sys/types.h for dev_t, devmajor_t.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/sys/conf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/conf.h
diff -u src/sys/sys/conf.h:1.161 src/sys/sys/conf.h:1.162
--- src/sys/sys/conf.h:1.161	Mon Mar 28 12:39:18 2022
+++ src/sys/sys/conf.h	Wed Apr 17 18:01:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.h,v 1.161 2022/03/28 12:39:18 riastradh Exp $	*/
+/*	$NetBSD: conf.h,v 1.162 2024/04/17 18:01:29 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -43,8 +43,9 @@
  * Definitions of device driver entry switches
  */
 
-#include 
 #include 
+#include 
+#include 
 
 struct buf;
 struct knote;
@@ -109,7 +110,7 @@ struct cdevsw {
 extern kmutex_t device_lock;
 
 int devsw_attach(const char *, const struct bdevsw *, devmajor_t *,
-		 const struct cdevsw *, devmajor_t *);
+const struct cdevsw *, devmajor_t *);
 void devsw_detach(const struct bdevsw *, const struct cdevsw *);
 const struct bdevsw *bdevsw_lookup(dev_t);
 const struct cdevsw *cdevsw_lookup(dev_t);



CVS commit: src/sys/sys

2024-04-17 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Apr 17 18:01:29 UTC 2024

Modified Files:
src/sys/sys: conf.h

Log Message:
sys/conf.h: Need sys/types.h for dev_t, devmajor_t.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/sys/conf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-04-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Apr 10 20:00:12 UTC 2024

Modified Files:
src/sys/sys: disklabel.h

Log Message:
s/Unfornately/Unfortunately/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/sys/disklabel.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/disklabel.h
diff -u src/sys/sys/disklabel.h:1.127 src/sys/sys/disklabel.h:1.128
--- src/sys/sys/disklabel.h:1.127	Tue Nov  1 06:47:41 2022
+++ src/sys/sys/disklabel.h	Wed Apr 10 20:00:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.127 2022/11/01 06:47:41 simonb Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.128 2024/04/10 20:00:12 andvar Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -127,7 +127,7 @@ struct	partition {		/* the partition tab
  * padding at the end, but that would have been confusing (although that
  * is what actually happens), because the partitions structure is supposed
  * to be variable size and putting a padding uint32_t would be weird.
- * Unfornately mips32 and i386 align uint64_t standalone at an 8 byte
+ * Unfortunately mips32 and i386 align uint64_t standalone at an 8 byte
  * boundary, but in structures at a 4 byte boundary so matt's
  * change did not affect them.
  *



CVS commit: src/sys/sys

2024-04-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Apr 10 20:00:12 UTC 2024

Modified Files:
src/sys/sys: disklabel.h

Log Message:
s/Unfornately/Unfortunately/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/sys/disklabel.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 28 10:06:19 UTC 2024

Modified Files:
src/sys/sys: userret.h

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/userret.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/userret.h
diff -u src/sys/sys/userret.h:1.34 src/sys/sys/userret.h:1.35
--- src/sys/sys/userret.h:1.34	Sat Sep 23 18:48:05 2023
+++ src/sys/sys/userret.h	Sun Jan 28 10:06:19 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.34 2023/09/23 18:48:05 ad Exp $	*/
+/*	$NetBSD: userret.h,v 1.35 2024/01/28 10:06:19 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2003, 2006, 2008, 2019, 2020, 2023
@@ -41,7 +41,7 @@
  * Define the MI code needed before returning to user mode, for trap and
  * syscall.
  *
- * We handle "exceptional" events: pending signals, stop/exit actions, etc. 
+ * We handle "exceptional" events: pending signals, stop/exit actions, etc.
  * Note that the event must be flagged BEFORE any AST is posted as we are
  * reading unlocked.
  */



CVS commit: src/sys/sys

2024-01-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 28 10:06:19 UTC 2024

Modified Files:
src/sys/sys: userret.h

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/userret.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Jan 22 21:15:02 UTC 2024

Modified Files:
src/sys/sys: mbuf.h

Log Message:
fix M_CSUM_BITS bitfield for M_CSUM_BLANK - \37 is the bit before \40

noticed by rillig@ thanks


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/mbuf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Jan 22 21:15:02 UTC 2024

Modified Files:
src/sys/sys: mbuf.h

Log Message:
fix M_CSUM_BITS bitfield for M_CSUM_BLANK - \37 is the bit before \40

noticed by rillig@ thanks


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/mbuf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.238 src/sys/sys/mbuf.h:1.239
--- src/sys/sys/mbuf.h:1.238	Wed Apr 12 06:48:08 2023
+++ src/sys/sys/mbuf.h	Mon Jan 22 21:15:02 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbuf.h,v 1.238 2023/04/12 06:48:08 riastradh Exp $	*/
+/*	$NetBSD: mbuf.h,v 1.239 2024/01/22 21:15:02 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -226,7 +226,7 @@ struct pkthdr {
 
 #define M_CSUM_BITS \
 "\20\1TCPv4\2UDPv4\3TCP_UDP_BAD\4DATA\5TCPv6\6UDPv6\7IPv4\10IPv4_BAD" \
-"\11TSOv4\12TSOv6\39BLANK\40NO_PSEUDOHDR"
+"\11TSOv4\12TSOv6\37BLANK\40NO_PSEUDOHDR"
 
 /*
  * Macros for manipulating csum_data on outgoing packets. These are



CVS commit: src/sys/sys

2024-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 22 18:50:46 UTC 2024

Modified Files:
src/sys/sys: socket.h

Log Message:
PR/57871: Haelwenn Monnier: Don't use u_char because it is not defined in with
POSIX_C_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/sys/socket.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 22 18:50:46 UTC 2024

Modified Files:
src/sys/sys: socket.h

Log Message:
PR/57871: Haelwenn Monnier: Don't use u_char because it is not defined in with
POSIX_C_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/sys/socket.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/socket.h
diff -u src/sys/sys/socket.h:1.131 src/sys/sys/socket.h:1.132
--- src/sys/sys/socket.h:1.131	Tue Nov  2 16:35:51 2021
+++ src/sys/sys/socket.h	Mon Jan 22 13:50:46 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.h,v 1.131 2021/11/02 20:35:51 christos Exp $	*/
+/*	$NetBSD: socket.h,v 1.132 2024/01/22 18:50:46 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -527,7 +527,7 @@ struct cmsghdr {
 	socklen_t	cmsg_len;	/* data byte count, including hdr */
 	int		cmsg_level;	/* originating protocol */
 	int		cmsg_type;	/* protocol-specific type */
-/* followed by	u_char  cmsg_data[]; */
+/* followed by unsigned char cmsg_data[]; */
 };
 
 /*
@@ -552,8 +552,8 @@ struct cmsghdr {
 (__CASTV(char *, (mhdr)->msg_control) + (mhdr)->msg_controllen)
 
 /* given pointer to struct cmsghdr, return pointer to data */
-#define	CMSG_DATA(cmsg) (__CASTV(u_char *, cmsg) + __CMSG_ASIZE)
-#define	CCMSG_DATA(cmsg) (__CASTCV(const u_char *, cmsg) + __CMSG_ASIZE)
+#define	CMSG_DATA(cmsg) (__CASTV(unsigned char *, cmsg) + __CMSG_ASIZE)
+#define	CCMSG_DATA(cmsg) (__CASTCV(const unsigned char *, cmsg) + __CMSG_ASIZE)
 
 /* given pointer to struct cmsghdr, return pointer to next cmsghdr */
 #define	CMSG_NXTHDR(mhdr, cmsg)	\



CVS commit: src/sys/sys

2024-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 20 13:15:46 UTC 2024

Modified Files:
src/sys/sys: sysctl.h

Log Message:
Make __learn_tree always visible. It starts with __ anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/sysctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 20 13:15:46 UTC 2024

Modified Files:
src/sys/sys: sysctl.h

Log Message:
Make __learn_tree always visible. It starts with __ anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/sysctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.238 src/sys/sys/sysctl.h:1.239
--- src/sys/sys/sysctl.h:1.238	Fri Jan 19 13:39:59 2024
+++ src/sys/sys/sysctl.h	Sat Jan 20 08:15:46 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.238 2024/01/19 18:39:59 christos Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.239 2024/01/20 13:15:46 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -1231,9 +1231,7 @@ int	proc_compare(const struct kinfo_proc
 const struct kinfo_proc2 *, const struct kinfo_lwp *);
 void	*asysctl(const int *, size_t, size_t *);
 void	*asysctlbyname(const char *, size_t *);
-#ifdef _LIBC_INTERNAL
 int	__learn_tree(int *, u_int, struct sysctlnode *);
-#endif
 __END_DECLS
 
 #endif	/* !_KERNEL */



CVS commit: src/sys/sys

2024-01-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 19 18:39:59 UTC 2024

Modified Files:
src/sys/sys: ptree.h sha2.h sysctl.h

Log Message:
Add missing decls.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/ptree.h
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/sha2.h
cvs rdiff -u -r1.237 -r1.238 src/sys/sys/sysctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ptree.h
diff -u src/sys/sys/ptree.h:1.8 src/sys/sys/ptree.h:1.9
--- src/sys/sys/ptree.h:1.8	Sat Oct  6 18:15:09 2012
+++ src/sys/sys/ptree.h	Fri Jan 19 13:39:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptree.h,v 1.8 2012/10/06 22:15:09 matt Exp $	*/
+/*	$NetBSD: ptree.h,v 1.9 2024/01/19 18:39:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -190,5 +190,6 @@ void *	ptree_find_filtered_node(pt_tree_
 	ptree_find_filtered_node((pt), (key), NULL, NULL)
 void	ptree_remove_node(pt_tree_t *, void *);
 void *	ptree_iterate(pt_tree_t *, const void *, pt_direction_t);
+bool	ptree_check(const pt_tree_t *pt);
 
 #endif /* _SYS_PTREE_H_ */

Index: src/sys/sys/sha2.h
diff -u src/sys/sys/sha2.h:1.3 src/sys/sys/sha2.h:1.4
--- src/sys/sys/sha2.h:1.3	Tue May 26 04:04:12 2009
+++ src/sys/sys/sha2.h	Fri Jan 19 13:39:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sha2.h,v 1.3 2009/05/26 08:04:12 joerg Exp $	*/
+/*	$NetBSD: sha2.h,v 1.4 2024/01/19 18:39:59 christos Exp $	*/
 /*	$KAME: sha2.h,v 1.4 2003/07/20 00:28:38 itojun Exp $	*/
 
 /*
@@ -115,6 +115,13 @@ char *SHA512_FileChunk(const char *, cha
 char *SHA512_File(const char *, char *);
 char *SHA512_Data(const uint8_t *, size_t, char[SHA512_DIGEST_STRING_LENGTH]);
 #endif /* !_KERNEL */
+
+#ifdef _LIBC_INTERNAL
+void SHA224_Transform(SHA224_CTX *, const uint32_t*);
+void SHA256_Transform(SHA256_CTX *, const uint32_t*);
+void SHA384_Transform(SHA384_CTX *, const uint64_t*);
+void SHA512_Transform(SHA512_CTX *, const uint64_t*);
+#endif
 __END_DECLS
 
 #endif /* __SHA2_H__ */

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.237 src/sys/sys/sysctl.h:1.238
--- src/sys/sys/sysctl.h:1.237	Thu Apr  6 23:01:21 2023
+++ src/sys/sys/sysctl.h	Fri Jan 19 13:39:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.237 2023/04/07 03:01:21 simonb Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.238 2024/01/19 18:39:59 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -1231,6 +1231,9 @@ int	proc_compare(const struct kinfo_proc
 const struct kinfo_proc2 *, const struct kinfo_lwp *);
 void	*asysctl(const int *, size_t, size_t *);
 void	*asysctlbyname(const char *, size_t *);
+#ifdef _LIBC_INTERNAL
+int	__learn_tree(int *, u_int, struct sysctlnode *);
+#endif
 __END_DECLS
 
 #endif	/* !_KERNEL */



CVS commit: src/sys/sys

2024-01-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 19 18:39:59 UTC 2024

Modified Files:
src/sys/sys: ptree.h sha2.h sysctl.h

Log Message:
Add missing decls.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/ptree.h
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/sha2.h
cvs rdiff -u -r1.237 -r1.238 src/sys/sys/sysctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 18:15:37 UTC 2024

Modified Files:
src/sys/sys: device.h

Log Message:
Revert unintended commit (didn't hit CTRL-C fast enough I guess).


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/sys/device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/device.h
diff -u src/sys/sys/device.h:1.187 src/sys/sys/device.h:1.188
--- src/sys/sys/device.h:1.187	Mon Jan 15 18:14:23 2024
+++ src/sys/sys/device.h	Mon Jan 15 18:15:37 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.187 2024/01/15 18:14:23 thorpej Exp $ */
+/* $NetBSD: device.h,v 1.188 2024/01/15 18:15:37 thorpej Exp $ */
 
 /*
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -622,16 +622,11 @@ bool		devhandle_is_valid(devhandle_t);
 devhandle_t	devhandle_invalid(void);
 devhandle_type_t devhandle_type(devhandle_t);
 int		devhandle_compare(devhandle_t, devhandle_t);
-devhandle_t	devhandle_subclass(devhandle_t, struct devhandle_impl *,
-		device_call_t (*)(devhandle_t, const char *,
-  devhandle_t *));
 
 device_call_t	devhandle_lookup_device_call(devhandle_t, const char *,
 		devhandle_t *);
-void		devhandle_impl_subclass(struct devhandle_impl *,
-		const struct devhandle_impl *,
-		device_call_t (*)(devhandle_t, const char *,
-  devhandle_t *));
+void		devhandle_impl_inherit(struct devhandle_impl *,
+		const struct devhandle_impl *);
 
 device_t	deviter_first(deviter_t *, deviter_flags_t);
 void		deviter_init(deviter_t *, deviter_flags_t);
@@ -722,13 +717,10 @@ struct device_call_generic {
 	void *args;
 };
 
-int		device_call_generic(device_t, devhandle_t,
-		const struct device_call_generic *);
+int	device_call_generic(device_t, const struct device_call_generic *);
 
 #define	device_call(dev, call)		\
-	device_call_generic((dev), device_handle(dev), &(call)->generic)
-#define	devhandle_call(handle, call)	\
-	device_call_generic(NULL, (handle), &(call)->generic)
+	device_call_generic((dev), &(call)->generic)
 
 #endif /* _KERNEL */
 



CVS commit: src/sys/sys

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 18:15:37 UTC 2024

Modified Files:
src/sys/sys: device.h

Log Message:
Revert unintended commit (didn't hit CTRL-C fast enough I guess).


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/sys/device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 18:14:24 UTC 2024

Modified Files:
src/sys/sys: device.h evcnt.h

Log Message:
Provide an ev_count32 field for situations where a 32-bit counter is
sufficient (and, notably, might be desirable to avoid 64-bit math on
an older 32-bit platform).  This is overlaid on the 64-bit counter
field, and simply references the correct half based on byte order.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/sys/device.h
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/evcnt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/device.h
diff -u src/sys/sys/device.h:1.186 src/sys/sys/device.h:1.187
--- src/sys/sys/device.h:1.186	Mon May 22 14:58:22 2023
+++ src/sys/sys/device.h	Mon Jan 15 18:14:23 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.186 2023/05/22 14:58:22 riastradh Exp $ */
+/* $NetBSD: device.h,v 1.187 2024/01/15 18:14:23 thorpej Exp $ */
 
 /*
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -622,11 +622,16 @@ bool		devhandle_is_valid(devhandle_t);
 devhandle_t	devhandle_invalid(void);
 devhandle_type_t devhandle_type(devhandle_t);
 int		devhandle_compare(devhandle_t, devhandle_t);
+devhandle_t	devhandle_subclass(devhandle_t, struct devhandle_impl *,
+		device_call_t (*)(devhandle_t, const char *,
+  devhandle_t *));
 
 device_call_t	devhandle_lookup_device_call(devhandle_t, const char *,
 		devhandle_t *);
-void		devhandle_impl_inherit(struct devhandle_impl *,
-		const struct devhandle_impl *);
+void		devhandle_impl_subclass(struct devhandle_impl *,
+		const struct devhandle_impl *,
+		device_call_t (*)(devhandle_t, const char *,
+  devhandle_t *));
 
 device_t	deviter_first(deviter_t *, deviter_flags_t);
 void		deviter_init(deviter_t *, deviter_flags_t);
@@ -717,10 +722,13 @@ struct device_call_generic {
 	void *args;
 };
 
-int	device_call_generic(device_t, const struct device_call_generic *);
+int		device_call_generic(device_t, devhandle_t,
+		const struct device_call_generic *);
 
 #define	device_call(dev, call)		\
-	device_call_generic((dev), &(call)->generic)
+	device_call_generic((dev), device_handle(dev), &(call)->generic)
+#define	devhandle_call(handle, call)	\
+	device_call_generic(NULL, (handle), &(call)->generic)
 
 #endif /* _KERNEL */
 

Index: src/sys/sys/evcnt.h
diff -u src/sys/sys/evcnt.h:1.10 src/sys/sys/evcnt.h:1.11
--- src/sys/sys/evcnt.h:1.10	Tue Aug  3 23:12:14 2021
+++ src/sys/sys/evcnt.h	Mon Jan 15 18:14:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: evcnt.h,v 1.10 2021/08/03 23:12:14 andvar Exp $	*/
+/*	$NetBSD: evcnt.h,v 1.11 2024/01/15 18:14:23 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -83,7 +83,10 @@
  */
 
 struct evcnt {
-	uint64_t	ev_count;	/* how many have occurred */
+	union {
+		uint64_t ev_count;	/* how many have occurred */
+		uint32_t ev__count32[2];
+	};
 	TAILQ_ENTRY(evcnt) ev_list;	/* entry on list of all counters */
 	unsigned char	ev_type;	/* counter type; see below */
 	unsigned char	ev_grouplen;	/* 'group' len, excluding NUL */
@@ -95,6 +98,16 @@ struct evcnt {
 };
 TAILQ_HEAD(evcntlist, evcnt);
 
+/*
+ * For 32-bit counters, ev_count32 is the correct half of the 64-bit
+ * counter field.
+ */
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define	ev_count32	ev__count32[1]
+#elif _BYTE_ORDER == _LITTLE_ENDIAN
+#define	ev_count32	ev__count32[0]
+#endif
+
 /* maximum group/name lengths, including trailing NUL */
 #define	EVCNT_STRING_MAX	255
 



CVS commit: src/sys/sys

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 18:14:24 UTC 2024

Modified Files:
src/sys/sys: device.h evcnt.h

Log Message:
Provide an ev_count32 field for situations where a 32-bit counter is
sufficient (and, notably, might be desirable to avoid 64-bit math on
an older 32-bit platform).  This is overlaid on the 64-bit counter
field, and simply references the correct half based on byte order.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/sys/device.h
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/evcnt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/sys

2024-01-06 Thread Christos Zoulas
In article <2017973.usquhbg...@britannica.bec.de>,
Joerg Sonnenberger   wrote:
>On Tuesday, January 2, 2024 8:27:57 PM CET Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Tue Jan  2 19:27:57 UTC 2024
>> 
>> Modified Files:
>>  src/sys/sys: rbtree.h
>> 
>> Log Message:
>> This uses size_t, so it always needs , remove ifdefs.
>
>sys/types.h is one of the most polluting headers we have. This is a huge
>step backwards...

You realize of course that it was working before because it was getting
sys/types.h from sys/endian.h which had an include cycle before which I was
trying to fix. Now sys/endian.h does not include sys/types.h which is a step
forward. Yes, our headers are messy but we are trying to clean them.


Happy New Year,

christos



CVS commit: src/sys/sys

2024-01-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  3 18:43:52 UTC 2024

Modified Files:
src/sys/sys: endian.h

Log Message:
break the cycle: this does not need  it only needs 


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/endian.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/endian.h
diff -u src/sys/sys/endian.h:1.31 src/sys/sys/endian.h:1.32
--- src/sys/sys/endian.h:1.31	Mon Aug  8 14:55:18 2022
+++ src/sys/sys/endian.h	Wed Jan  3 13:43:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: endian.h,v 1.31 2022/08/08 18:55:18 rillig Exp $	*/
+/*	$NetBSD: endian.h,v 1.32 2024/01/03 18:43:52 christos Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -52,7 +52,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 #ifndef in_addr_t
 typedef __in_addr_t	in_addr_t;



CVS commit: src/sys/sys

2024-01-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  3 18:43:52 UTC 2024

Modified Files:
src/sys/sys: endian.h

Log Message:
break the cycle: this does not need  it only needs 


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/endian.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/sys

2024-01-02 Thread Robert Elz
Date:Tue, 2 Jan 2024 21:20:42 -0500
From:Jason Thorpe 
Message-ID:  

  |  seems safe

Safe probably, but also wrong.   It looks to be there puerly
for the __BEGIN_DECLS / __END_DECLS definitions - which are
needed just beause  has prototypes for lseek()
truncate() and ftruncate() which make no sense in 
at all (beyond ancient history).

kre


Re: CVS commit: src/sys/sys

2024-01-02 Thread Jason Thorpe



> On Jan 2, 2024, at 8:41 PM, Robert Elz  wrote:
> 
> I doubt that  should really be including 
> and almost certainly not , and shouldn't have prototypes
> for any functions at all.

 seems safe — all of that stuff is in the implementation namespace.

-- thorpej



Re: CVS commit: src/sys/sys

2024-01-02 Thread Robert Elz
Date:Wed, 3 Jan 2024 03:15:39 +0300
From:Valery Ushakov 
Message-ID:  

  | for userland uses should include stddef.h where size_t is supposed
  | to come from

Unfortunately, while  is defined to specify size_t it
isn't specified to include ssize_t - and many things that need
size_t also need ssize_t (which includes src/usr.bin/tprof one of
the users of )

All of this is horribly ugly - perhaps we'd do better to remove
stuff from  that shouldn't be there (which is probably
any definition which doesn't end in _t except probably the old u_char
u_short ... and their uchar/ushort/... variants).   In particular
I doubt that  should really be including 
and almost certainly not , and shouldn't have prototypes
for any functions at all.

kre



Re: CVS commit: src/sys/sys

2024-01-02 Thread Valery Ushakov
On Wed, Jan 03, 2024 at 01:06:57 +0100, Joerg Sonnenberger wrote:
> Date: Wed, 03 Jan 2024 01:06:57 +0100
> From: Joerg Sonnenberger 
> Subject: Re: CVS commit: src/sys/sys
> To: source-changes-d@netbsd.org
> 
> On Tuesday, January 2, 2024 8:27:57 PM CET Christos Zoulas wrote:
> > Module Name:src
> > Committed By:   christos
> > Date:   Tue Jan  2 19:27:57 UTC 2024
> > 
> > Modified Files:
> > src/sys/sys: rbtree.h
> > 
> > Log Message:
> > This uses size_t, so it always needs , remove ifdefs.
> 
> sys/types.h is one of the most polluting headers we have. This is a huge
> step backwards...

Yes, I think we should keep the ifdef and for userland uses should
include stddef.h where size_t is supposed to come from (is inttypes.h
really needed there, or is it it just b/c it happens to include most
of the same stuff that stddef.h does and hence define size_t?)

-uwe


Re: CVS commit: src/sys/sys

2024-01-02 Thread Joerg Sonnenberger
On Tuesday, January 2, 2024 8:27:57 PM CET Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Tue Jan  2 19:27:57 UTC 2024
> 
> Modified Files:
>   src/sys/sys: rbtree.h
> 
> Log Message:
> This uses size_t, so it always needs , remove ifdefs.

sys/types.h is one of the most polluting headers we have. This is a huge
step backwards...

Joerg




CVS commit: src/sys/sys

2024-01-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jan  2 22:39:00 UTC 2024

Modified Files:
src/sys/sys: rbtree.h

Log Message:
Fix previous so  isn't included with _KERNEL (etc).
Like it used to be.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/rbtree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/rbtree.h
diff -u src/sys/sys/rbtree.h:1.10 src/sys/sys/rbtree.h:1.11
--- src/sys/sys/rbtree.h:1.10	Tue Jan  2 22:35:22 2024
+++ src/sys/sys/rbtree.h	Tue Jan  2 22:39:00 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbtree.h,v 1.10 2024/01/02 22:35:22 kre Exp $	*/
+/*	$NetBSD: rbtree.h,v 1.11 2024/01/02 22:39:00 kre Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #include 
 #include 
 
-#ifdef RBDEBUG
+#if !defined(_KERNEL) && !defined(_STANDALONE) && defined(RBDEBUG)
 #include 
 #endif
 



CVS commit: src/sys/sys

2024-01-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jan  2 22:39:00 UTC 2024

Modified Files:
src/sys/sys: rbtree.h

Log Message:
Fix previous so  isn't included with _KERNEL (etc).
Like it used to be.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/rbtree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jan  2 22:35:22 UTC 2024

Modified Files:
src/sys/sys: rbtree.h

Log Message:
Put back  - but only when RBDEBUG is defined (the
similarly conditional rb_tree_check() prototype needs "bool").


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/rbtree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-01-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jan  2 22:35:22 UTC 2024

Modified Files:
src/sys/sys: rbtree.h

Log Message:
Put back  - but only when RBDEBUG is defined (the
similarly conditional rb_tree_check() prototype needs "bool").


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/rbtree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/rbtree.h
diff -u src/sys/sys/rbtree.h:1.9 src/sys/sys/rbtree.h:1.10
--- src/sys/sys/rbtree.h:1.9	Tue Jan  2 19:27:57 2024
+++ src/sys/sys/rbtree.h	Tue Jan  2 22:35:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbtree.h,v 1.9 2024/01/02 19:27:57 christos Exp $	*/
+/*	$NetBSD: rbtree.h,v 1.10 2024/01/02 22:35:22 kre Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,6 +36,10 @@
 #include 
 #include 
 
+#ifdef RBDEBUG
+#include 
+#endif
+
 __BEGIN_DECLS
 
 typedef struct rb_node {



CVS commit: src/sys/sys

2024-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  2 19:27:57 UTC 2024

Modified Files:
src/sys/sys: rbtree.h

Log Message:
This uses size_t, so it always needs , remove ifdefs.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/rbtree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/rbtree.h
diff -u src/sys/sys/rbtree.h:1.8 src/sys/sys/rbtree.h:1.9
--- src/sys/sys/rbtree.h:1.8	Fri Jul 21 07:26:23 2023
+++ src/sys/sys/rbtree.h	Tue Jan  2 14:27:57 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbtree.h,v 1.8 2023/07/21 11:26:23 riastradh Exp $	*/
+/*	$NetBSD: rbtree.h,v 1.9 2024/01/02 19:27:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,12 +32,7 @@
 #ifndef _SYS_RBTREE_H_
 #define	_SYS_RBTREE_H_
 
-#if defined(_KERNEL) || defined(_STANDALONE)
 #include 
-#else
-#include 
-#include 
-#endif
 #include 
 #include 
 



CVS commit: src/sys/sys

2024-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  2 19:27:57 UTC 2024

Modified Files:
src/sys/sys: rbtree.h

Log Message:
This uses size_t, so it always needs , remove ifdefs.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/rbtree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-12-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec  2 19:11:52 UTC 2023

Modified Files:
src/sys/sys: vmem.h vmem_impl.h

Log Message:
vmem_init() requires the caller to include  in order
to know the storage size of "struct vmem", so put the prototype for
vmem_init() there as well.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/sys/vmem.h
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/vmem_impl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/vmem.h
diff -u src/sys/sys/vmem.h:1.22 src/sys/sys/vmem.h:1.23
--- src/sys/sys/vmem.h:1.22	Tue Jun 16 06:42:36 2020
+++ src/sys/sys/vmem.h	Sat Dec  2 19:11:52 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmem.h,v 1.22 2020/06/16 06:42:36 thorpej Exp $	*/
+/*	$NetBSD: vmem.h,v 1.23 2023/12/02 19:11:52 thorpej Exp $	*/
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -64,9 +64,6 @@ vmem_t *	vmem_create(const char *, vmem_
 vmem_t *	vmem_xcreate(const char *, vmem_addr_t, vmem_size_t,
 		vmem_size_t, vmem_ximport_t *, vmem_release_t *, vmem_t *,
 		vmem_size_t, vm_flag_t, int);
-vmem_t *	vmem_init(vmem_t *, const char *, vmem_addr_t, vmem_size_t,
-		vmem_size_t, vmem_import_t *, vmem_release_t *, vmem_t *,
-		vmem_size_t, vm_flag_t, int);
 void		vmem_destroy(vmem_t *);
 int		vmem_alloc(vmem_t *, vmem_size_t, vm_flag_t, vmem_addr_t *);
 void		vmem_free(vmem_t *, vmem_addr_t, vmem_size_t);

Index: src/sys/sys/vmem_impl.h
diff -u src/sys/sys/vmem_impl.h:1.5 src/sys/sys/vmem_impl.h:1.6
--- src/sys/sys/vmem_impl.h:1.5	Tue Jul  7 03:23:33 2020
+++ src/sys/sys/vmem_impl.h	Sat Dec  2 19:11:52 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmem_impl.h,v 1.5 2020/07/07 03:23:33 thorpej Exp $	*/
+/*	$NetBSD: vmem_impl.h,v 1.6 2023/12/02 19:11:52 thorpej Exp $	*/
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -139,4 +139,8 @@ struct vmem_btag {
 
 #define	BT_END(bt)	((bt)->bt_start + (bt)->bt_size - 1)
 
+vmem_t *	vmem_init(vmem_t *, const char *, vmem_addr_t, vmem_size_t,
+		vmem_size_t, vmem_import_t *, vmem_release_t *, vmem_t *,
+		vmem_size_t, vm_flag_t, int);
+
 #endif /* !_SYS_VMEM_IMPL_H_ */



CVS commit: src/sys/sys

2023-12-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec  2 19:11:52 UTC 2023

Modified Files:
src/sys/sys: vmem.h vmem_impl.h

Log Message:
vmem_init() requires the caller to include  in order
to know the storage size of "struct vmem", so put the prototype for
vmem_init() there as well.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/sys/vmem.h
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/vmem_impl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-11-22 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 22 12:15:09 UTC 2023

Modified Files:
src/sys/sys: pax.h

Log Message:
PAGE_SIZE will not evaluate to a vaddr_t expression on all architectures
(e.g. sparc), so cast it to that.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/sys/pax.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/pax.h
diff -u src/sys/sys/pax.h:1.28 src/sys/sys/pax.h:1.29
--- src/sys/sys/pax.h:1.28	Tue Nov 21 14:35:36 2023
+++ src/sys/sys/pax.h	Wed Nov 22 12:15:09 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pax.h,v 1.28 2023/11/21 14:35:36 riastradh Exp $ */
+/* $NetBSD: pax.h,v 1.29 2023/11/22 12:15:09 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Elad Efrat 
@@ -150,7 +150,7 @@ pax_aslr_stack_gap(struct exec_package *
 static inline vaddr_t
 pax_aslr_exec_offset(struct exec_package *epp, vaddr_t align)
 {
-	return MAX(align, PAGE_SIZE);
+	return MAX(align, (vaddr_t)PAGE_SIZE);
 }
 static inline voff_t
 pax_aslr_rtld_offset(struct exec_package *epp, vaddr_t align, int use_topdown)



CVS commit: src/sys/sys

2023-11-22 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 22 12:15:09 UTC 2023

Modified Files:
src/sys/sys: pax.h

Log Message:
PAGE_SIZE will not evaluate to a vaddr_t expression on all architectures
(e.g. sparc), so cast it to that.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/sys/pax.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-11-08 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed Nov  8 19:27:13 UTC 2023

Modified Files:
src/sys/sys: un.h

Log Message:
Use a #define for sockaddr_un.sun_path and add the historical context around
why it is set to 104. (struct sockaddr needed to fit into an mbuf)

>From FreeBSD; no objections on current-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/sys/un.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/un.h
diff -u src/sys/sys/un.h:1.60 src/sys/sys/un.h:1.61
--- src/sys/sys/un.h:1.60	Sun Aug  8 20:54:49 2021
+++ src/sys/sys/un.h	Wed Nov  8 19:27:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: un.h,v 1.60 2021/08/08 20:54:49 nia Exp $	*/
+/*	$NetBSD: un.h,v 1.61 2023/11/08 19:27:13 jschauma Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -44,12 +44,20 @@ typedef __sa_family_t	sa_family_t;
 #endif
 
 /*
+ * Historically, (struct sockaddr) needed to fit inside an mbuf.
+ * For this reason, UNIX domain sockets were therefore limited to
+ * 104 bytes. While this limit is no longer necessary, it is kept for
+ * binary compatibility reasons.
+ */
+#define	SUNPATHLEN	104
+
+/*
  * Definitions for UNIX IPC domain.
  */
 struct	sockaddr_un {
-	uint8_t		sun_len;	/* total sockaddr length */
-	sa_family_t	sun_family;	/* AF_LOCAL */
-	char		sun_path[104];	/* path name (gag) */
+	uint8_t		sun_len;		/* total sockaddr length */
+	sa_family_t	sun_family;		/* AF_LOCAL */
+	char		sun_path[SUNPATHLEN];	/* path name (gag) */
 };
 
 /*



CVS commit: src/sys/sys

2023-11-08 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed Nov  8 19:27:13 UTC 2023

Modified Files:
src/sys/sys: un.h

Log Message:
Use a #define for sockaddr_un.sun_path and add the historical context around
why it is set to 104. (struct sockaddr needed to fit into an mbuf)

>From FreeBSD; no objections on current-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/sys/un.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-27 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Oct 27 14:34:58 UTC 2023

Modified Files:
src/sys/sys: clock.h

Log Message:
revert previous and go back to ifdef and 'include '

As noted on current-users, using sys/stdint.h breaks building tools
(albeit perhaps surprisingly so).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/clock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/clock.h
diff -u src/sys/sys/clock.h:1.6 src/sys/sys/clock.h:1.7
--- src/sys/sys/clock.h:1.6	Thu Oct 26 14:04:45 2023
+++ src/sys/sys/clock.h	Fri Oct 27 14:34:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.h,v 1.6 2023/10/26 14:04:45 jschauma Exp $	*/
+/*	$NetBSD: clock.h,v 1.7 2023/10/27 14:34:58 jschauma Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -32,7 +32,9 @@
 #ifndef _SYS_CLOCK_H_
 #define _SYS_CLOCK_H_
 
-#include 
+#if !defined(_KERNEL) && !defined(_STANDALONE) 
+#include 
+#endif
 
 /* Some handy constants. */
 #define SECS_PER_MINUTE		60



CVS commit: src/sys/sys

2023-10-27 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Oct 27 14:34:58 UTC 2023

Modified Files:
src/sys/sys: clock.h

Log Message:
revert previous and go back to ifdef and 'include '

As noted on current-users, using sys/stdint.h breaks building tools
(albeit perhaps surprisingly so).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/clock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-26 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Oct 26 14:04:46 UTC 2023

Modified Files:
src/sys/sys: clock.h

Log Message:
change include to sys/stdint.h, as suggested by simonb@

This avoids the need for #ifdefs, and stdint.h turns out to be a symlink
to sys/stdint.h to begin with.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/clock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/clock.h
diff -u src/sys/sys/clock.h:1.5 src/sys/sys/clock.h:1.6
--- src/sys/sys/clock.h:1.5	Thu Oct 26 00:59:16 2023
+++ src/sys/sys/clock.h	Thu Oct 26 14:04:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.h,v 1.5 2023/10/26 00:59:16 jschauma Exp $	*/
+/*	$NetBSD: clock.h,v 1.6 2023/10/26 14:04:45 jschauma Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -32,9 +32,7 @@
 #ifndef _SYS_CLOCK_H_
 #define _SYS_CLOCK_H_
 
-#if !defined(_KERNEL) && !defined(_STANDALONE)
-#include 
-#endif
+#include 
 
 /* Some handy constants. */
 #define SECS_PER_MINUTE		60



CVS commit: src/sys/sys

2023-10-26 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Oct 26 14:04:46 UTC 2023

Modified Files:
src/sys/sys: clock.h

Log Message:
change include to sys/stdint.h, as suggested by simonb@

This avoids the need for #ifdefs, and stdint.h turns out to be a symlink
to sys/stdint.h to begin with.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/clock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Oct 26 00:59:16 UTC 2023

Modified Files:
src/sys/sys: clock.h

Log Message:
include stdint.h if not in kernel/standalone mode

This fixes problems with including sys/clock.h by itself and avoids
having to order headers counter to share/style.

ifdefs suggested by tnn@ on netbsd-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/clock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/clock.h
diff -u src/sys/sys/clock.h:1.4 src/sys/sys/clock.h:1.5
--- src/sys/sys/clock.h:1.4	Thu Apr 19 21:19:07 2018
+++ src/sys/sys/clock.h	Thu Oct 26 00:59:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.h,v 1.4 2018/04/19 21:19:07 christos Exp $	*/
+/*	$NetBSD: clock.h,v 1.5 2023/10/26 00:59:16 jschauma Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _SYS_CLOCK_H_
 #define _SYS_CLOCK_H_
 
+#if !defined(_KERNEL) && !defined(_STANDALONE)
+#include 
+#endif
+
 /* Some handy constants. */
 #define SECS_PER_MINUTE		60
 #define SECS_PER_HOUR		3600



CVS commit: src/sys/sys

2023-10-25 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Thu Oct 26 00:59:16 UTC 2023

Modified Files:
src/sys/sys: clock.h

Log Message:
include stdint.h if not in kernel/standalone mode

This fixes problems with including sys/clock.h by itself and avoids
having to order headers counter to share/style.

ifdefs suggested by tnn@ on netbsd-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/clock.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-25 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 25 08:22:25 UTC 2023

Modified Files:
src/sys/sys: unistd.h

Log Message:
Align sysconf numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/sys/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/unistd.h
diff -u src/sys/sys/unistd.h:1.64 src/sys/sys/unistd.h:1.65
--- src/sys/sys/unistd.h:1.64	Wed Oct 25 08:19:34 2023
+++ src/sys/sys/unistd.h	Wed Oct 25 08:22:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.64 2023/10/25 08:19:34 simonb Exp $	*/
+/*	$NetBSD: unistd.h,v 1.65 2023/10/25 08:22:25 simonb Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -227,121 +227,121 @@
  * XXX The value of _SC_CLK_TCK is embedded in .
  * XXX The value of _SC_PAGESIZE is embedded in .
  */
-#define	_SC_ARG_MAX		 1
-#define	_SC_CHILD_MAX		 2
-#define	_O_SC_CLK_TCK		 3 /* Old version, always 100 */
-#define	_SC_NGROUPS_MAX		 4
-#define	_SC_OPEN_MAX		 5
-#define	_SC_JOB_CONTROL		 6
-#define	_SC_SAVED_IDS		 7
-#define	_SC_VERSION		 8
-#define	_SC_BC_BASE_MAX		 9
-#define	_SC_BC_DIM_MAX		10
-#define	_SC_BC_SCALE_MAX	11
-#define	_SC_BC_STRING_MAX	12
-#define	_SC_COLL_WEIGHTS_MAX	13
-#define	_SC_EXPR_NEST_MAX	14
-#define	_SC_LINE_MAX		15
-#define	_SC_RE_DUP_MAX		16
-#define	_SC_2_VERSION		17
-#define	_SC_2_C_BIND		18
-#define	_SC_2_C_DEV		19
-#define	_SC_2_CHAR_TERM		20
-#define	_SC_2_FORT_DEV		21
-#define	_SC_2_FORT_RUN		22
-#define	_SC_2_LOCALEDEF		23
-#define	_SC_2_SW_DEV		24
-#define	_SC_2_UPE		25
-#define	_SC_STREAM_MAX		26
-#define	_SC_TZNAME_MAX		27
-#define	_SC_PAGESIZE		28
-#define	_SC_PAGE_SIZE		_SC_PAGESIZE	/* 1170 compatibility */
-#define	_SC_FSYNC		29
-#define	_SC_XOPEN_SHM		30
-#define	_SC_SYNCHRONIZED_IO	31
-#define	_SC_IOV_MAX		32
-#define	_SC_MAPPED_FILES	33
-#define	_SC_MEMLOCK		34
-#define	_SC_MEMLOCK_RANGE	35
-#define	_SC_MEMORY_PROTECTION	36
-#define	_SC_LOGIN_NAME_MAX	37
-#define	_SC_MONOTONIC_CLOCK	38
-#define	_SC_CLK_TCK		39 /* New, variable version */
-#define	_SC_ATEXIT_MAX		40
-#define	_SC_THREADS		41
-#define	_SC_SEMAPHORES		42
-#define	_SC_BARRIERS		43
-#define	_SC_TIMERS		44
-#define	_SC_SPIN_LOCKS		45
-#define	_SC_READER_WRITER_LOCKS	46
-#define	_SC_GETGR_R_SIZE_MAX	47
-#define	_SC_GETPW_R_SIZE_MAX	48
-#define	_SC_CLOCK_SELECTION	49
-#define	_SC_ASYNCHRONOUS_IO	50
-#define	_SC_AIO_LISTIO_MAX	51
-#define	_SC_AIO_MAX		52
-#define	_SC_MESSAGE_PASSING	53
-#define	_SC_MQ_OPEN_MAX		54
-#define	_SC_MQ_PRIO_MAX		55
-#define	_SC_PRIORITY_SCHEDULING	56
-#define	_SC_THREAD_DESTRUCTOR_ITERATIONS 57
-#define	_SC_THREAD_KEYS_MAX		58
-#define	_SC_THREAD_STACK_MIN		59
-#define	_SC_THREAD_THREADS_MAX		60
-#define	_SC_THREAD_ATTR_STACKADDR	61
-#define	_SC_THREAD_ATTR_STACKSIZE 	62
-#define	_SC_THREAD_PRIORITY_SCHEDULING	63
-#define	_SC_THREAD_PRIO_INHERIT 	64
-#define	_SC_THREAD_PRIO_PROTECT		65
-#define	_SC_THREAD_PROCESS_SHARED	66
-#define	_SC_THREAD_SAFE_FUNCTIONS	67
-#define	_SC_TTY_NAME_MAX		68
-#define	_SC_HOST_NAME_MAX		69
-#define	_SC_PASS_MAX			70
-#define	_SC_REGEXP			71
-#define	_SC_SHELL			72
-#define	_SC_SYMLOOP_MAX			73
+#define	_SC_ARG_MAX			   1
+#define	_SC_CHILD_MAX			   2
+#define	_O_SC_CLK_TCK			   3 /* Old version, always 100 */
+#define	_SC_NGROUPS_MAX			   4
+#define	_SC_OPEN_MAX			   5
+#define	_SC_JOB_CONTROL			   6
+#define	_SC_SAVED_IDS			   7
+#define	_SC_VERSION			   8
+#define	_SC_BC_BASE_MAX			   9
+#define	_SC_BC_DIM_MAX			  10
+#define	_SC_BC_SCALE_MAX		  11
+#define	_SC_BC_STRING_MAX		  12
+#define	_SC_COLL_WEIGHTS_MAX		  13
+#define	_SC_EXPR_NEST_MAX		  14
+#define	_SC_LINE_MAX			  15
+#define	_SC_RE_DUP_MAX			  16
+#define	_SC_2_VERSION			  17
+#define	_SC_2_C_BIND			  18
+#define	_SC_2_C_DEV			  19
+#define	_SC_2_CHAR_TERM			  20
+#define	_SC_2_FORT_DEV			  21
+#define	_SC_2_FORT_RUN			  22
+#define	_SC_2_LOCALEDEF			  23
+#define	_SC_2_SW_DEV			  24
+#define	_SC_2_UPE			  25
+#define	_SC_STREAM_MAX			  26
+#define	_SC_TZNAME_MAX			  27
+#define	_SC_PAGESIZE			  28
+#define	_SC_PAGE_SIZE			  _SC_PAGESIZE	/* 1170 compatibility */
+#define	_SC_FSYNC			  29
+#define	_SC_XOPEN_SHM			  30
+#define	_SC_SYNCHRONIZED_IO		  31
+#define	_SC_IOV_MAX			  32
+#define	_SC_MAPPED_FILES		  33
+#define	_SC_MEMLOCK			  34
+#define	_SC_MEMLOCK_RANGE		  35
+#define	_SC_MEMORY_PROTECTION		  36
+#define	_SC_LOGIN_NAME_MAX		  37
+#define	_SC_MONOTONIC_CLOCK		  38
+#define	_SC_CLK_TCK			  39 /* New, variable version */
+#define	_SC_ATEXIT_MAX			  40
+#define	_SC_THREADS			  41
+#define	_SC_SEMAPHORES			  42
+#define	_SC_BARRIERS			  43
+#define	_SC_TIMERS			  44
+#define	_SC_SPIN_LOCKS			  45
+#define	_SC_READER_WRITER_LOCKS		  46
+#define	_SC_GETGR_R_SIZE_MAX		  47
+#define	_SC_GETPW_R_SIZE_MAX		  48
+#define	_SC_CLOCK_SELECTION		  49
+#define	_SC_ASYNCHRONOUS_IO		  50
+#define	_SC_AIO_LISTIO_MAX		  51
+#define	_SC_AIO_MAX			  52
+#define	_SC_MESSAGE_PASSING		  53
+#define	_SC_MQ_OPEN_MAX			  54

CVS commit: src/sys/sys

2023-10-25 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 25 08:22:25 UTC 2023

Modified Files:
src/sys/sys: unistd.h

Log Message:
Align sysconf numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/sys/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-17 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Oct 17 10:28:06 UTC 2023

Modified Files:
src/sys/sys: pipe.h

Log Message:
sys/pipe.h: #define

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/sys/pipe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-17 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Oct 17 10:28:06 UTC 2023

Modified Files:
src/sys/sys: pipe.h

Log Message:
sys/pipe.h: #define

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/sys/pipe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/pipe.h
diff -u src/sys/sys/pipe.h:1.40 src/sys/sys/pipe.h:1.41
--- src/sys/sys/pipe.h:1.40	Fri Oct 13 19:07:09 2023
+++ src/sys/sys/pipe.h	Tue Oct 17 10:28:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pipe.h,v 1.40 2023/10/13 19:07:09 ad Exp $	*/
+/*	$NetBSD: pipe.h,v 1.41 2023/10/17 10:28:06 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1996 John S. Dyson
@@ -24,7 +24,7 @@
  */
 
 #ifndef _SYS_PIPE_H_
-#define _SYS_PIPE_H_
+#define	_SYS_PIPE_H_
 
 #include 		/* for struct selinfo */
 #include 			/* for struct timespec */
@@ -35,11 +35,11 @@
  * Pipe buffer size, keep moderate in value, pipes take kva space.
  */
 #ifndef PIPE_SIZE
-#define PIPE_SIZE	16384
+#define	PIPE_SIZE	16384
 #endif
 
 #ifndef BIG_PIPE_SIZE
-#define BIG_PIPE_SIZE	(4*PIPE_SIZE)
+#define	BIG_PIPE_SIZE	(4*PIPE_SIZE)
 #endif
 
 /*
@@ -48,7 +48,7 @@
  * size.
  */
 #ifndef PIPE_DIRECT_CHUNK
-#define PIPE_DIRECT_CHUNK	(1*1024*1024)
+#define	PIPE_DIRECT_CHUNK	(1*1024*1024)
 #endif
 
 /*
@@ -56,7 +56,7 @@
  * than PIPE_BUF.
  */
 #ifndef PIPE_MINDIRECT
-#define PIPE_MINDIRECT	8192
+#define	PIPE_MINDIRECT	8192
 #endif
 
 /*
@@ -75,12 +75,12 @@ struct pipebuf {
 /*
  * Bits in pipe_state.
  */
-#define PIPE_RDASYNC	0x001	/* Async I/O on reader side */
-#define PIPE_WRASYNC	0x002	/* Async I/O on writer side */
-#define PIPE_RDOPEN	0x010	/* Reader side open */
-#define PIPE_WROPEN	0x020	/* Writer side open */
-#define PIPE_EOF	0x100	/* Pipe is in EOF condition */
-#define PIPE_SIGNALR	0x200	/* Do selwakeup() on read(2) */
+#define	PIPE_RDASYNC	0x001	/* Async I/O on reader side */
+#define	PIPE_WRASYNC	0x002	/* Async I/O on writer side */
+#define	PIPE_RDOPEN	0x010	/* Reader side open */
+#define	PIPE_WROPEN	0x020	/* Writer side open */
+#define	PIPE_EOF	0x100	/* Pipe is in EOF condition */
+#define	PIPE_SIGNALR	0x200	/* Do selwakeup() on read(2) */
 #define	PIPE_RESIZED	0x400	/* Attempted to resize */
 
 /*



CVS commit: src/sys/sys

2023-10-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 15 10:30:00 UTC 2023

Modified Files:
src/sys/sys: sleepq.h

Log Message:
sys/sleepq.h: Sort includes.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/sys/sleepq.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/sleepq.h
diff -u src/sys/sys/sleepq.h:1.41 src/sys/sys/sleepq.h:1.42
--- src/sys/sys/sleepq.h:1.41	Sun Oct 15 10:27:11 2023
+++ src/sys/sys/sleepq.h	Sun Oct 15 10:30:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.h,v 1.41 2023/10/15 10:27:11 riastradh Exp $	*/
+/*	$NetBSD: sleepq.h,v 1.42 2023/10/15 10:30:00 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -33,12 +33,13 @@
 #ifndef	_SYS_SLEEPQ_H_
 #define	_SYS_SLEEPQ_H_
 
+#include 
+
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 struct syncobj;



CVS commit: src/sys/sys

2023-10-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 15 10:30:00 UTC 2023

Modified Files:
src/sys/sys: sleepq.h

Log Message:
sys/sleepq.h: Sort includes.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/sys/sleepq.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 15 10:29:44 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Sort includes.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.229 src/sys/sys/lwp.h:1.230
--- src/sys/sys/lwp.h:1.229	Sun Oct 15 10:27:11 2023
+++ src/sys/sys/lwp.h	Sun Oct 15 10:29:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.229 2023/10/15 10:27:11 riastradh Exp $	*/
+/*	$NetBSD: lwp.h,v 1.230 2023/10/15 10:29:44 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020, 2023
@@ -36,16 +36,17 @@
 #if defined(_KERNEL) || defined(_KMEMUSER)
 
 #include 
-#include 
-#include 
+
 #include 
+#include 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 #include 
+#include 
 #include 
-#include 
+#include 
 #include 
 
 #if defined(_KERNEL)



CVS commit: src/sys/sys

2023-10-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 15 10:29:44 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Sort includes.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:52:07 UTC 2023

Modified Files:
src/sys/sys: proc.h

Log Message:
p->p_stat is actually locked by proc_lock so document it that way and
shuffle some fields around so it's not next to p->p_trace_enabled (that
needs some attention too, in a later change).


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/sys/proc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/proc.h
diff -u src/sys/sys/proc.h:1.372 src/sys/sys/proc.h:1.373
--- src/sys/sys/proc.h:1.372	Tue Jul 11 09:48:56 2023
+++ src/sys/sys/proc.h	Wed Oct  4 20:52:07 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: proc.h,v 1.372 2023/07/11 09:48:56 riastradh Exp $	*/
+/*	$NetBSD: proc.h,v 1.373 2023/10/04 20:52:07 ad Exp $	*/
 
 /*-
- * Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
+ * Copyright (c) 2006, 2007, 2008, 2020, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -252,12 +252,12 @@ struct proc {
 	int		p_exitsig;	/* l: signal to send to parent on exit */
 	int		p_flag;		/* p: PK_* flags */
 	int		p_sflag;	/* p: PS_* flags */
-	int		p_slflag;	/* p, l: PSL_* flags */
-	int		p_lflag;	/* l: PL_* flags */
 	int		p_stflag;	/* t: PST_* flags */
-	char		p_stat;		/* p: S* process status. */
+	short		p_slflag;	/* l, p: PSL_* flags */
+	char		p_stat;		/* l: S* process status. */
+	char		p_lflag;	/* l: PL_* flags */
 	char		p_trace_enabled;/* p: cached by syscall_intern() */
-	char		p_pad1[2];	/*  unused */
+	char		p_pad1[3];	/*  unused */
 
 	pid_t		p_pid;		/* :: Process identifier. */
 	LIST_ENTRY(proc) p_pglist;	/* l: List of processes in pgrp. */
@@ -414,11 +414,11 @@ struct proc {
 #define	PSL_TRACEPOSIX_SPAWN	\
 			0x0020 /* traced process wants posix_spawn events */
 
-#define	PSL_TRACED	0x0800 /* Debugged process being traced */
-#define	PSL_TRACEDCHILD 0x1000 /* Report process birth */
-#define	PSL_CHTRACED	0x0040 /* Child has been traced & reparented */
-#define	PSL_SYSCALL	0x0400 /* process has PT_SYSCALL enabled */
-#define	PSL_SYSCALLEMU	0x0800 /* cancel in-progress syscall */
+#define	PSL_TRACED	0x0040 /* Debugged process being traced */
+#define	PSL_TRACEDCHILD 0x0080 /* Report process birth */
+#define	PSL_CHTRACED	0x0100 /* Child has been traced & reparented */
+#define	PSL_SYSCALL	0x0200 /* process has PT_SYSCALL enabled */
+#define	PSL_SYSCALLEMU	0x0400 /* cancel in-progress syscall */
 
 /*
  * Kept in p_stflag and protected by p_stmutex.
@@ -429,10 +429,10 @@ struct proc {
  * Kept in p_lflag and protected by the proc_lock.  Access
  * from process context only.
  */
-#define	PL_CONTROLT	0x0002 /* Has a controlling terminal */
-#define	PL_PPWAIT	0x0010 /* Parent is waiting for child exec/exit */
-#define	PL_SIGCOMPAT	0x0200 /* Has used compat signal trampoline */
-#define	PL_ORPHANPG	0x2000 /* Member of an orphaned pgrp */
+#define	PL_CONTROLT	0x0001 /* Has a controlling terminal */
+#define	PL_PPWAIT	0x0002 /* Parent is waiting for child exec/exit */
+#define	PL_SIGCOMPAT	0x0004 /* Has used compat signal trampoline */
+#define	PL_ORPHANPG	0x0008 /* Member of an orphaned pgrp */
 
 #if defined(_KMEMUSER) || defined(_KERNEL)
 



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:52:07 UTC 2023

Modified Files:
src/sys/sys: proc.h

Log Message:
p->p_stat is actually locked by proc_lock so document it that way and
shuffle some fields around so it's not next to p->p_trace_enabled (that
needs some attention too, in a later change).


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/sys/proc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:29:59 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
NetBSD 10.99.10: struct lwp and related things changed.


To generate a diff of this commit:
cvs rdiff -u -r1.732 -r1.733 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.732 src/sys/sys/param.h:1.733
--- src/sys/sys/param.h:1.732	Sat Sep 23 18:49:16 2023
+++ src/sys/sys/param.h	Wed Oct  4 20:29:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.732 2023/09/23 18:49:16 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.733 2023/10/04 20:29:59 ad Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	1099000900	/* NetBSD 10.99.9 */
+#define	__NetBSD_Version__	1099001000	/* NetBSD 10.99.10 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 20:29:59 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
NetBSD 10.99.10: struct lwp and related things changed.


To generate a diff of this commit:
cvs rdiff -u -r1.732 -r1.733 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:47:11 UTC 2023

Modified Files:
src/sys/sys: disklabel_gpt.h

Log Message:
Add the GUID for Microsoft Recovery partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/disklabel_gpt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/disklabel_gpt.h
diff -u src/sys/sys/disklabel_gpt.h:1.15 src/sys/sys/disklabel_gpt.h:1.16
--- src/sys/sys/disklabel_gpt.h:1.15	Sun Aug 28 13:50:50 2022
+++ src/sys/sys/disklabel_gpt.h	Tue Sep 26 15:47:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel_gpt.h,v 1.15 2022/08/28 13:50:50 riastradh Exp $	*/
+/*	$NetBSD: disklabel_gpt.h,v 1.16 2023/09/26 15:47:11 kre Exp $	*/
 
 /*
  * Copyright (c) 2002 Marcel Moolenaar
@@ -147,6 +147,8 @@ struct gpt_ent {
 	{0xe3c9e316,0x0b5c,0x4db8,0x81,0x7d,{0xf9,0x2d,0xf0,0x02,0x15,0xae}}
 #define	GPT_ENT_TYPE_MS_BASIC_DATA	\
 	{0xebd0a0a2,0xb9e5,0x4433,0x87,0xc0,{0x68,0xb6,0xb7,0x26,0x99,0xc7}}
+#define	GPT_ENT_TYPE_MS_RECOVERY	\
+	{0xde94bba4,0x06d1,0x4d40,0xa1,0x6a,{0xbf,0xd5,0x01,0x79,0xd6,0xac}}
 #define	GPT_ENT_TYPE_MS_LDM_METADATA	\
 	{0x5808c8aa,0x7e8f,0x42e0,0x85,0xd2,{0xe1,0xe9,0x04,0x34,0xcf,0xb3}}
 #define	GPT_ENT_TYPE_MS_LDM_DATA	\



CVS commit: src/sys/sys

2023-09-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Sep 26 15:47:11 UTC 2023

Modified Files:
src/sys/sys: disklabel_gpt.h

Log Message:
Add the GUID for Microsoft Recovery partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/disklabel_gpt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 18:55:53 UTC 2023

Modified Files:
src/sys/sys: sleepq.h

Log Message:
sys/sleepq.h: Fix more syncobj_t creep.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/sys/sleepq.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/sleepq.h
diff -u src/sys/sys/sleepq.h:1.37 src/sys/sys/sleepq.h:1.38
--- src/sys/sys/sleepq.h:1.37	Sat Sep 23 18:48:05 2023
+++ src/sys/sys/sleepq.h	Mon Sep 25 18:55:53 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.h,v 1.37 2023/09/23 18:48:05 ad Exp $	*/
+/*	$NetBSD: sleepq.h,v 1.38 2023/09/25 18:55:53 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -38,22 +38,24 @@
 #include 
 #include 
 #include 
-#include 
+#include 	/* XXX remove me */
 #include 
 
+struct syncobj;
+
 /*
  * Generic sleep queues.
  */
 
 typedef struct sleepq sleepq_t;
-typedef struct syncobj const syncobj_t;
 
 void	sleepq_init(sleepq_t *);
 void	sleepq_remove(sleepq_t *, lwp_t *);
 void	sleepq_enter(sleepq_t *, lwp_t *, kmutex_t *);
-void	sleepq_enqueue(sleepq_t *, wchan_t, const char *, syncobj_t *, bool);
+void	sleepq_enqueue(sleepq_t *, wchan_t, const char *,
+	const struct syncobj *, bool);
 void	sleepq_transfer(lwp_t *, sleepq_t *, sleepq_t *, wchan_t, const char *,
-	syncobj_t *, kmutex_t *, bool);
+	const struct syncobj *, kmutex_t *, bool);
 void	sleepq_uncatch(lwp_t *);
 void	sleepq_unsleep(lwp_t *, bool);
 void	sleepq_timeout(void *);
@@ -61,7 +63,7 @@ void	sleepq_wake(sleepq_t *, wchan_t, u_
 int	sleepq_abort(kmutex_t *, int);
 void	sleepq_changepri(lwp_t *, pri_t);
 void	sleepq_lendpri(lwp_t *, pri_t);
-int	sleepq_block(int, bool, syncobj_t *);
+int	sleepq_block(int, bool, const struct syncobj *);
 
 #ifdef _KERNEL
 



CVS commit: src/sys/sys

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 18:55:53 UTC 2023

Modified Files:
src/sys/sys: sleepq.h

Log Message:
sys/sleepq.h: Fix more syncobj_t creep.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/sys/sleepq.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 18:30:44 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Oops -- l_syncobj needs const now.


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.223 src/sys/sys/lwp.h:1.224
--- src/sys/sys/lwp.h:1.223	Mon Sep 25 17:09:27 2023
+++ src/sys/sys/lwp.h	Mon Sep 25 18:30:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.223 2023/09/25 17:09:27 riastradh Exp $	*/
+/*	$NetBSD: lwp.h,v 1.224 2023/09/25 18:30:44 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020, 2023
@@ -130,7 +130,7 @@ struct lwp {
 	kcpuset_t	*l_affinity;	/* l: CPU set for affinity */
 
 	/* Synchronisation. */
-	struct syncobj	*l_syncobj;	/* l: sync object operations set */
+	const struct syncobj *l_syncobj;/* l: sync object operations set */
 	LIST_ENTRY(lwp) l_sleepchain;	/* l: sleep queue */
 	wchan_t		l_wchan;	/* l: sleep address */
 	const char	*l_wmesg;	/* l: reason for sleep */



CVS commit: src/sys/sys

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 18:30:44 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Oops -- l_syncobj needs const now.


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 17:09:27 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Revert unnecessary style- and build-breaking change.

Broke the clang builds because of duplicate syncobj_t definitions.

Just use `struct syncobj'; the `syncobj_t' alias causes more trouble
than it's worth -- KNF now advises against it and I see no compelling
reason to make an exception here.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 17:09:27 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Revert unnecessary style- and build-breaking change.

Broke the clang builds because of duplicate syncobj_t definitions.

Just use `struct syncobj'; the `syncobj_t' alias causes more trouble
than it's worth -- KNF now advises against it and I see no compelling
reason to make an exception here.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.222 src/sys/sys/lwp.h:1.223
--- src/sys/sys/lwp.h:1.222	Sat Sep 23 20:23:07 2023
+++ src/sys/sys/lwp.h	Mon Sep 25 17:09:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.222 2023/09/23 20:23:07 ad Exp $	*/
+/*	$NetBSD: lwp.h,v 1.223 2023/09/25 17:09:27 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020, 2023
@@ -81,7 +81,6 @@ static __inline struct cpu_info *lwp_get
 
 #include 
 
-typedef struct syncobj const syncobj_t;
 struct lockdebug;
 struct sysent;
 
@@ -131,7 +130,7 @@ struct lwp {
 	kcpuset_t	*l_affinity;	/* l: CPU set for affinity */
 
 	/* Synchronisation. */
-	syncobj_t	*l_syncobj;	/* l: sync object operations set */
+	struct syncobj	*l_syncobj;	/* l: sync object operations set */
 	LIST_ENTRY(lwp) l_sleepchain;	/* l: sleep queue */
 	wchan_t		l_wchan;	/* l: sleep address */
 	const char	*l_wmesg;	/* l: reason for sleep */



CVS commit: src/sys/sys

2023-09-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Sep 23 18:49:16 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
NetBSD 10.99.9 - struct lwp changed


To generate a diff of this commit:
cvs rdiff -u -r1.731 -r1.732 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.731 src/sys/sys/param.h:1.732
--- src/sys/sys/param.h:1.731	Wed Sep  6 12:31:49 2023
+++ src/sys/sys/param.h	Sat Sep 23 18:49:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.731 2023/09/06 12:31:49 riastradh Exp $	*/
+/*	$NetBSD: param.h,v 1.732 2023/09/23 18:49:16 ad Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	1099000800	/* NetBSD 10.99.8 */
+#define	__NetBSD_Version__	1099000900	/* NetBSD 10.99.9 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2023-09-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Sep 23 18:49:16 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
NetBSD 10.99.9 - struct lwp changed


To generate a diff of this commit:
cvs rdiff -u -r1.731 -r1.732 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Sep 23 14:19:12 UTC 2023

Modified Files:
src/sys/sys: vmmeter.h

Log Message:
Remove last remnant of the long-dead PGINPROF option.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/sys/vmmeter.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/vmmeter.h
diff -u src/sys/sys/vmmeter.h:1.19 src/sys/sys/vmmeter.h:1.20
--- src/sys/sys/vmmeter.h:1.19	Wed Oct 21 21:12:07 2009
+++ src/sys/sys/vmmeter.h	Sat Sep 23 14:19:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmmeter.h,v 1.19 2009/10/21 21:12:07 rmind Exp $	*/
+/*	$NetBSD: vmmeter.h,v 1.20 2023/09/23 14:19:12 ad Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -53,42 +53,4 @@ struct vmtotal
 	int32_t	t_free;		/* free memory pages */
 };
 
-/*
- * Optional instrumentation.
- */
-#ifdef PGINPROF
-
-#define	NDMON	128
-#define	NSMON	128
-
-#define	DRES	20
-#define	SRES	5
-
-#define	PMONMIN	20
-#define	PRES	50
-#define	NPMON	64
-
-#define	RMONMIN	130
-#define	RRES	5
-#define	NRMON	64
-
-/* data and stack size distribution counters */
-u_int	dmon[NDMON+1];
-u_int	smon[NSMON+1];
-
-/* page in time distribution counters */
-u_int	pmon[NPMON+2];
-
-/* reclaim time distribution counters */
-u_int	rmon[NRMON+2];
-
-int	pmonmin;
-int	pres;
-int	rmonmin;
-int	rres;
-
-u_int rectime;		/* accumulator for reclaim times */
-u_int pgintime;		/* accumulator for page in times */
-#endif /* PGINPROF */
-
 #endif /* !_SYS_VMMETER_H_ */



CVS commit: src/sys/sys

2023-09-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Sep 23 14:19:12 UTC 2023

Modified Files:
src/sys/sys: vmmeter.h

Log Message:
Remove last remnant of the long-dead PGINPROF option.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/sys/vmmeter.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Sep 10 14:31:24 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
KPREEMPT_ENABLE(): optimise away one of the conditionals; the same test is
repeated in kpreempt() which is rarely called.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.219 src/sys/sys/lwp.h:1.220
--- src/sys/sys/lwp.h:1.219	Mon Aug  7 10:31:42 2023
+++ src/sys/sys/lwp.h	Sun Sep 10 14:31:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.219 2023/08/07 10:31:42 riastradh Exp $	*/
+/*	$NetBSD: lwp.h,v 1.220 2023/09/10 14:31:24 ad Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020
@@ -554,12 +554,10 @@ KPREEMPT_ENABLE(lwp_t *l)
 	KASSERTMSG(l == (l1 = curlwp), "l=%p curlwp=%p", l, l1);
 	KASSERT(l->l_nopreempt > 0);
 	__insn_barrier();
-	if (--l->l_nopreempt != 0)
-		return;
+	l->l_nopreempt--;
 	__insn_barrier();
 	if (__predict_false(l->l_dopreempt))
 		kpreempt(0);
-	__insn_barrier();
 }
 
 /* For lwp::l_dopreempt */



CVS commit: src/sys/sys

2023-09-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Sep 10 14:31:24 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
KPREEMPT_ENABLE(): optimise away one of the conditionals; the same test is
repeated in kpreempt() which is rarely called.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Sep  9 00:15:09 UTC 2023

Modified Files:
src/sys/sys: once.h systm.h

Log Message:
Revert "once(9): Assert sleepable in RUN_ONCE, unconditionally."

This would be nice but it'll break too many things for the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/once.h
cvs rdiff -u -r1.303 -r1.304 src/sys/sys/systm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Sep  9 00:15:09 UTC 2023

Modified Files:
src/sys/sys: once.h systm.h

Log Message:
Revert "once(9): Assert sleepable in RUN_ONCE, unconditionally."

This would be nice but it'll break too many things for the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/once.h
cvs rdiff -u -r1.303 -r1.304 src/sys/sys/systm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/once.h
diff -u src/sys/sys/once.h:1.8 src/sys/sys/once.h:1.9
--- src/sys/sys/once.h:1.8	Fri Sep  8 23:25:39 2023
+++ src/sys/sys/once.h	Sat Sep  9 00:15:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: once.h,v 1.8 2023/09/08 23:25:39 riastradh Exp $	*/
+/*	$NetBSD: once.h,v 1.9 2023/09/09 00:15:09 riastradh Exp $	*/
 
 /*-
  * Copyright (c)2005 YAMAMOTO Takashi,
@@ -30,9 +30,6 @@
 #ifndef _SYS_ONCE_H_
 #define	_SYS_ONCE_H_
 
-#include 
-#include 
-
 typedef struct {
 	int o_error;
 	uint16_t o_refcnt;
@@ -53,7 +50,7 @@ void _fini_once(once_t *, void (*)(void)
 	};
 
 #define	RUN_ONCE(o, fn) \
-(ASSERT_SLEEPABLE(), __predict_true((o)->o_status == ONCE_DONE) ? \
+(__predict_true((o)->o_status == ONCE_DONE) ? \
   ((o)->o_error) : _init_once((o), (fn)))
 
 #define	INIT_ONCE(o, fn)	_init_once((o), (fn))

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.303 src/sys/sys/systm.h:1.304
--- src/sys/sys/systm.h:1.303	Fri Sep  8 23:25:39 2023
+++ src/sys/sys/systm.h	Sat Sep  9 00:15:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.303 2023/09/08 23:25:39 riastradh Exp $	*/
+/*	$NetBSD: systm.h,v 1.304 2023/09/09 00:15:09 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -762,7 +762,7 @@ void assert_sleepable(void);
 #if defined(DEBUG)
 #define	ASSERT_SLEEPABLE()	assert_sleepable()
 #else /* defined(DEBUG) */
-#define	ASSERT_SLEEPABLE()	__nothing
+#define	ASSERT_SLEEPABLE()	do {} while (0)
 #endif /* defined(DEBUG) */
 
 



CVS commit: src/sys/sys

2023-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Sep  8 23:25:39 UTC 2023

Modified Files:
src/sys/sys: once.h systm.h

Log Message:
once(9): Assert sleepable in RUN_ONCE, unconditionally.

Otherwise there's a good chance we'll never exercise many paths that
call RUN_ONCE when it's not sleepable, just because it's already been
done in a sleepable context before.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/sys/once.h
cvs rdiff -u -r1.302 -r1.303 src/sys/sys/systm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-09-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Sep  8 23:25:39 UTC 2023

Modified Files:
src/sys/sys: once.h systm.h

Log Message:
once(9): Assert sleepable in RUN_ONCE, unconditionally.

Otherwise there's a good chance we'll never exercise many paths that
call RUN_ONCE when it's not sleepable, just because it's already been
done in a sleepable context before.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/sys/once.h
cvs rdiff -u -r1.302 -r1.303 src/sys/sys/systm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/once.h
diff -u src/sys/sys/once.h:1.7 src/sys/sys/once.h:1.8
--- src/sys/sys/once.h:1.7	Tue Mar 19 08:16:51 2019
+++ src/sys/sys/once.h	Fri Sep  8 23:25:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: once.h,v 1.7 2019/03/19 08:16:51 ryo Exp $	*/
+/*	$NetBSD: once.h,v 1.8 2023/09/08 23:25:39 riastradh Exp $	*/
 
 /*-
  * Copyright (c)2005 YAMAMOTO Takashi,
@@ -30,6 +30,9 @@
 #ifndef _SYS_ONCE_H_
 #define	_SYS_ONCE_H_
 
+#include 
+#include 
+
 typedef struct {
 	int o_error;
 	uint16_t o_refcnt;
@@ -50,7 +53,7 @@ void _fini_once(once_t *, void (*)(void)
 	};
 
 #define	RUN_ONCE(o, fn) \
-(__predict_true((o)->o_status == ONCE_DONE) ? \
+(ASSERT_SLEEPABLE(), __predict_true((o)->o_status == ONCE_DONE) ? \
   ((o)->o_error) : _init_once((o), (fn)))
 
 #define	INIT_ONCE(o, fn)	_init_once((o), (fn))

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.302 src/sys/sys/systm.h:1.303
--- src/sys/sys/systm.h:1.302	Mon May 22 14:07:24 2023
+++ src/sys/sys/systm.h	Fri Sep  8 23:25:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.302 2023/05/22 14:07:24 riastradh Exp $	*/
+/*	$NetBSD: systm.h,v 1.303 2023/09/08 23:25:39 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -762,7 +762,7 @@ void assert_sleepable(void);
 #if defined(DEBUG)
 #define	ASSERT_SLEEPABLE()	assert_sleepable()
 #else /* defined(DEBUG) */
-#define	ASSERT_SLEEPABLE()	do {} while (0)
+#define	ASSERT_SLEEPABLE()	__nothing
 #endif /* defined(DEBUG) */
 
 



CVS commit: src/sys/sys

2023-09-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep  6 12:31:49 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
sys/param.h: Welcome to 10.99.8!

Courtesy of nestable heartbeat_suspend/resume, which changed struct
cpu_info.


To generate a diff of this commit:
cvs rdiff -u -r1.730 -r1.731 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.730 src/sys/sys/param.h:1.731
--- src/sys/sys/param.h:1.730	Sun Jul 30 20:34:44 2023
+++ src/sys/sys/param.h	Wed Sep  6 12:31:49 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.730 2023/07/30 20:34:44 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.731 2023/09/06 12:31:49 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	1099000700	/* NetBSD 10.99.7 */
+#define	__NetBSD_Version__	1099000800	/* NetBSD 10.99.8 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2023-09-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Sep  6 12:31:49 UTC 2023

Modified Files:
src/sys/sys: param.h

Log Message:
sys/param.h: Welcome to 10.99.8!

Courtesy of nestable heartbeat_suspend/resume, which changed struct
cpu_info.


To generate a diff of this commit:
cvs rdiff -u -r1.730 -r1.731 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-08-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug  7 10:31:42 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Slightly more paranoia re curlwp in PR port-evbarm/57564.


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.218 src/sys/sys/lwp.h:1.219
--- src/sys/sys/lwp.h:1.218	Mon Aug  7 09:41:56 2023
+++ src/sys/sys/lwp.h	Mon Aug  7 10:31:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.218 2023/08/07 09:41:56 riastradh Exp $	*/
+/*	$NetBSD: lwp.h,v 1.219 2023/08/07 10:31:42 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020
@@ -539,8 +539,9 @@ CURCPU_IDLE_P(void)
 static __inline void
 KPREEMPT_DISABLE(lwp_t *l)
 {
+	struct lwp *l1 __diagused;
 
-	KASSERTMSG(l == curlwp, "l=%p curlwp=%p", l, curlwp);
+	KASSERTMSG(l == (l1 = curlwp), "l=%p curlwp=%p", l, l1);
 	l->l_nopreempt++;
 	__insn_barrier();
 }
@@ -548,8 +549,9 @@ KPREEMPT_DISABLE(lwp_t *l)
 static __inline void
 KPREEMPT_ENABLE(lwp_t *l)
 {
+	struct lwp *l1 __diagused;
 
-	KASSERTMSG(l == curlwp, "l=%p curlwp=%p", l, curlwp);
+	KASSERTMSG(l == (l1 = curlwp), "l=%p curlwp=%p", l, l1);
 	KASSERT(l->l_nopreempt > 0);
 	__insn_barrier();
 	if (--l->l_nopreempt != 0)



CVS commit: src/sys/sys

2023-08-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug  7 10:31:42 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: Slightly more paranoia re curlwp in PR port-evbarm/57564.


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-08-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug  7 09:41:56 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: KASSERT -> KASSERTMSG

Might help diagnose PR port-evbarm/57564.


To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.217 src/sys/sys/lwp.h:1.218
--- src/sys/sys/lwp.h:1.217	Sat Jul 23 19:15:29 2022
+++ src/sys/sys/lwp.h	Mon Aug  7 09:41:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.217 2022/07/23 19:15:29 mrg Exp $	*/
+/*	$NetBSD: lwp.h,v 1.218 2023/08/07 09:41:56 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020
@@ -540,7 +540,7 @@ static __inline void
 KPREEMPT_DISABLE(lwp_t *l)
 {
 
-	KASSERT(l == curlwp);
+	KASSERTMSG(l == curlwp, "l=%p curlwp=%p", l, curlwp);
 	l->l_nopreempt++;
 	__insn_barrier();
 }
@@ -549,7 +549,7 @@ static __inline void
 KPREEMPT_ENABLE(lwp_t *l)
 {
 
-	KASSERT(l == curlwp);
+	KASSERTMSG(l == curlwp, "l=%p curlwp=%p", l, curlwp);
 	KASSERT(l->l_nopreempt > 0);
 	__insn_barrier();
 	if (--l->l_nopreempt != 0)



CVS commit: src/sys/sys

2023-08-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Aug  7 09:41:56 UTC 2023

Modified Files:
src/sys/sys: lwp.h

Log Message:
sys/lwp.h: KASSERT -> KASSERTMSG

Might help diagnose PR port-evbarm/57564.


To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-08-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Aug  1 16:33:43 UTC 2023

Modified Files:
src/sys/sys: vnode_impl.h

Log Message:
vnode_impl.h: clarify comment, from freenode


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/vnode_impl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2023-08-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Aug  1 16:33:43 UTC 2023

Modified Files:
src/sys/sys: vnode_impl.h

Log Message:
vnode_impl.h: clarify comment, from freenode


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/vnode_impl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/vnode_impl.h
diff -u src/sys/sys/vnode_impl.h:1.26 src/sys/sys/vnode_impl.h:1.27
--- src/sys/sys/vnode_impl.h:1.26	Sat Apr 29 10:07:05 2023
+++ src/sys/sys/vnode_impl.h	Tue Aug  1 16:33:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_impl.h,v 1.26 2023/04/29 10:07:05 riastradh Exp $	*/
+/*	$NetBSD: vnode_impl.h,v 1.27 2023/08/01 16:33:43 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2019, 2020 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@ struct vcache_key {
  *	l	vi_nc_listlock
  *	m	mnt_vnodelock
  *	n	vi_nc_lock
- *	n,l	vi_nc_lock + vi_nc_listlock to modify
+ *	n,l	both vi_nc_lock + vi_nc_listlock to modify, either to read
  *	s	syncer_data_lock
  */
 struct vnode_impl {



  1   2   3   4   5   6   7   8   9   10   >