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
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to