Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2016 16:27:41 +0000 (UTC)
From:      Julian Elischer <julian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r303395 - stable/10/sys/sys
Message-ID:  <201607271627.u6RGRfAD096294@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: julian
Date: Wed Jul 27 16:27:41 2016
New Revision: 303395
URL: https://svnweb.freebsd.org/changeset/base/303395

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/10/sys/sys/sysent.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/sysent.h
==============================================================================
--- stable/10/sys/sys/sysent.h	Wed Jul 27 16:01:44 2016	(r303394)
+++ stable/10/sys/sys/sysent.h	Wed Jul 27 16:27:41 2016	(r303395)
@@ -173,13 +173,21 @@ struct syscall_module_data {
 	struct sysent old_sysent;	/* old sysent */
 };
 
-#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 = {			\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607271627.u6RGRfAD096294>