Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2013 23:05:44 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255777 - head/sys/kern
Message-ID:  <201309212305.r8LN5ikB035041@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Sep 21 23:05:44 2013
New Revision: 255777
URL: http://svnweb.freebsd.org/changeset/base/255777

Log:
  Omit "__restrict" when generating syscall argument strings. DTrace doesn't
  handle it and cannot determine the argument type when it's present.
  
  Approved by:	re (gjb)
  MFC after:	1 week

Modified:
  head/sys/kern/makesyscalls.sh

Modified: head/sys/kern/makesyscalls.sh
==============================================================================
--- head/sys/kern/makesyscalls.sh	Sat Sep 21 22:43:50 2013	(r255776)
+++ head/sys/kern/makesyscalls.sh	Sat Sep 21 23:05:44 2013	(r255777)
@@ -403,19 +403,21 @@ s/\$//g
 			printf("\t\tswitch(ndx) {\n") > systracetmp
 			printf("\t\tstruct %s *p = params;\n", argalias) > systrace
 			for (i = 1; i <= argc; i++) {
-				printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, argtype[i]) > systracetmp
-				if (index(argtype[i], "*") > 0 || argtype[i] == "caddr_t")
+				arg = argtype[i]
+				sub("__restrict$", "", arg)
+				printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp
+				if (index(arg, "*") > 0 || arg == "caddr_t")
 					printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \
 					     i - 1, \
-					     argname[i], argtype[i]) > systrace
-				else if (substr(argtype[i], 1, 1) == "u" || argtype[i] == "size_t")
+					     argname[i], arg) > systrace
+				else if (substr(arg, 1, 1) == "u" || arg == "size_t")
 					printf("\t\tuarg[%d] = p->%s; /* %s */\n", \
 					     i - 1, \
-					     argname[i], argtype[i]) > systrace
+					     argname[i], arg) > systrace
 				else
 					printf("\t\tiarg[%d] = p->%s; /* %s */\n", \
 					     i - 1, \
-					     argname[i], argtype[i]) > systrace
+					     argname[i], arg) > systrace
 			}
 			printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systracetmp
 



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