svn commit: r309391 - stable/11/sys/sys

Julian Elischer julian at FreeBSD.org
Fri Dec 2 05:47:53 UTC 2016


Author: julian
Date: Fri Dec  2 05:47:52 2016
New Revision: 309391
URL: https://svnweb.freebsd.org/changeset/base/309391

Log:
  MFH: r303287
  
  Split MAKE_SYSENT into two parts so that the initializer part can be
  used separately if one wants to embed the sysent into a larger structure.

Modified:
  stable/11/sys/sys/sysent.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/sys/sysent.h
==============================================================================
--- stable/11/sys/sys/sysent.h	Fri Dec  2 05:42:49 2016	(r309390)
+++ stable/11/sys/sys/sysent.h	Fri Dec  2 05:47:52 2016	(r309391)
@@ -175,13 +175,21 @@ struct syscall_module_data {
 	int	flags;			/* flags for syscall_register */
 };
 
-#define	MAKE_SYSENT(syscallname)				\
-static struct sysent syscallname##_sysent = {			\
-	(sizeof(struct syscallname ## _args )			\
+/* separate initialization vector so it can be used in a substructure */
+#define SYSENT_INIT_VALS(_syscallname) {			\
+	.sy_narg = (sizeof(struct _syscallname ## _args )	\
 	    / sizeof(register_t)),				\
-	(sy_call_t *)& sys_##syscallname,	       		\
-	SYS_AUE_##syscallname					\
-}
+	.sy_call = (sy_call_t *)&sys_##_syscallname,		\
+	.sy_auevent = SYS_AUE_##_syscallname,			\
+	.sy_systrace_args_func = NULL,				\
+	.sy_entry = 0,						\
+	.sy_return = 0,						\
+	.sy_flags = 0,						\
+	.sy_thrcnt = 0						\
+}							
+
+#define	MAKE_SYSENT(syscallname)				\
+static struct sysent syscallname##_sysent = SYSENT_INIT_VALS(syscallname);
 
 #define	MAKE_SYSENT_COMPAT(syscallname)				\
 static struct sysent syscallname##_sysent = {			\


More information about the svn-src-stable-11 mailing list