Date: Mon, 17 Feb 2014 12:24:05 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r262034 - stable/9/sys/kern Message-ID: <201402171224.s1HCO5lK033934@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Feb 17 12:24:05 2014 New Revision: 262034 URL: http://svnweb.freebsd.org/changeset/base/262034 Log: MFC r255777: Omit "__restrict" when generating syscall argument strings syscall argument strings are also regenerated as part of this commit Modified: stable/9/sys/kern/makesyscalls.sh stable/9/sys/kern/systrace_args.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/makesyscalls.sh ============================================================================== --- stable/9/sys/kern/makesyscalls.sh Mon Feb 17 12:14:50 2014 (r262033) +++ stable/9/sys/kern/makesyscalls.sh Mon Feb 17 12:24:05 2014 (r262034) @@ -392,19 +392,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 } Modified: stable/9/sys/kern/systrace_args.c ============================================================================== --- stable/9/sys/kern/systrace_args.c Mon Feb 17 12:14:50 2014 (r262033) +++ stable/9/sys/kern/systrace_args.c Mon Feb 17 12:24:05 2014 (r262034) @@ -209,8 +209,8 @@ systrace_args(int sysnum, void *params, uarg[1] = (intptr_t) p->buf; /* caddr_t */ uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ - uarg[4] = (intptr_t) p->from; /* struct sockaddr *__restrict */ - uarg[5] = (intptr_t) p->fromlenaddr; /* __socklen_t *__restrict */ + uarg[4] = (intptr_t) p->from; /* struct sockaddr * */ + uarg[5] = (intptr_t) p->fromlenaddr; /* __socklen_t * */ *n_args = 6; break; } @@ -218,8 +218,8 @@ systrace_args(int sysnum, void *params, case 30: { struct accept_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->anamelen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->name; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->anamelen; /* __socklen_t * */ *n_args = 3; break; } @@ -227,8 +227,8 @@ systrace_args(int sysnum, void *params, case 31: { struct getpeername_args *p = params; iarg[0] = p->fdes; /* int */ - uarg[1] = (intptr_t) p->asa; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->alen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->asa; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->alen; /* __socklen_t * */ *n_args = 3; break; } @@ -236,8 +236,8 @@ systrace_args(int sysnum, void *params, case 32: { struct getsockname_args *p = params; iarg[0] = p->fdes; /* int */ - uarg[1] = (intptr_t) p->asa; /* struct sockaddr *__restrict */ - uarg[2] = (intptr_t) p->alen; /* __socklen_t *__restrict */ + uarg[1] = (intptr_t) p->asa; /* struct sockaddr * */ + uarg[2] = (intptr_t) p->alen; /* __socklen_t * */ *n_args = 3; break; } @@ -3594,10 +3594,10 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 4: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 5: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -3610,10 +3610,10 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -3626,10 +3626,10 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break; @@ -3642,10 +3642,10 @@ systrace_setargdesc(int sysnum, int ndx, p = "int"; break; case 1: - p = "struct sockaddr *__restrict"; + p = "struct sockaddr *"; break; case 2: - p = "__socklen_t *__restrict"; + p = "__socklen_t *"; break; default: break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402171224.s1HCO5lK033934>