summaryrefslogtreecommitdiffstats
path: root/sys/kern/makesyscalls.sh
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-09-25 20:07:42 +0000
committerjhb <jhb@FreeBSD.org>2008-09-25 20:07:42 +0000
commit00776aeb581a27af198e57c4d7c48198c3af6f03 (patch)
tree2d86342cfddf85672b7cabbaa1c75a865dff4583 /sys/kern/makesyscalls.sh
parenta87bfbe313ff337a63706aaefb95e607c7192367 (diff)
downloadFreeBSD-src-00776aeb581a27af198e57c4d7c48198c3af6f03.zip
FreeBSD-src-00776aeb581a27af198e57c4d7c48198c3af6f03.tar.gz
Tidy up a few things with syscall generation:
- Instead of using a syscall slot (370) just to get a function prototype for lkmressys(), add an explicit function prototype to <sys/sysent.h>. This also removes unused special case checks for 'lkmressys' from makesyscalls.sh. - Instead of having magic logic in makesyscalls.sh to only generate a function prototype the first time 'lkmnosys' is seen, make 'NODEF' always not generate a function prototype and include an explicit prototype for 'lkmnosys' in <sys/sysent.h>. - As a result of the fix in (2), update the LKM syscall entries in the freebsd32 syscall table to use 'lkmnosys' rather than 'nosys'. - Use NOPROTO for the __syscall() entry (198) in the native ABI. This avoids the need for magic logic in makesyscalls.h to only generate a function prototype the first time 'nosys' is encountered.
Diffstat (limited to 'sys/kern/makesyscalls.sh')
-rw-r--r--sys/kern/makesyscalls.sh38
1 files changed, 14 insertions, 24 deletions
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index 74737f2..2b778b1 100644
--- a/sys/kern/makesyscalls.sh
+++ b/sys/kern/makesyscalls.sh
@@ -345,37 +345,27 @@ s/\$//g
}
printf("\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", argc) > systrace
printf("\t\tbreak;\n") > systracetmp
- if ((!nosys || funcname != "nosys") && \
- (funcname != "lkmnosys") && (funcname != "lkmressys")) {
- if (argc != 0 && $3 != "NOARGS" && $3 != "NOPROTO") {
- printf("struct %s {\n", argalias) > sysarg
- for (i = 1; i <= argc; i++)
- printf("\tchar %s_l_[PADL_(%s)]; " \
- "%s %s; char %s_r_[PADR_(%s)];\n",
- argname[i], argtype[i],
- argtype[i], argname[i],
- argname[i], argtype[i]) > sysarg
- printf("};\n") > sysarg
- }
- else if ($3 != "NOARGS" && $3 != "NOPROTO" && \
- $3 != "NODEF")
- printf("struct %s {\n\tregister_t dummy;\n};\n",
- argalias) > sysarg
+ if (argc != 0 && $3 != "NOARGS" && $3 != "NOPROTO" && \
+ $3 != "NODEF") {
+ printf("struct %s {\n", argalias) > sysarg
+ for (i = 1; i <= argc; i++)
+ printf("\tchar %s_l_[PADL_(%s)]; " \
+ "%s %s; char %s_r_[PADR_(%s)];\n",
+ argname[i], argtype[i],
+ argtype[i], argname[i],
+ argname[i], argtype[i]) > sysarg
+ printf("};\n") > sysarg
}
- if (($3 != "NOPROTO" && $3 != "NODEF" && \
- (funcname != "nosys" || !nosys)) || \
- (funcname == "lkmnosys" && !lkmnosys) || \
- funcname == "lkmressys") {
+ else if ($3 != "NOARGS" && $3 != "NOPROTO" && $3 != "NODEF")
+ printf("struct %s {\n\tregister_t dummy;\n};\n",
+ argalias) > sysarg
+ if ($3 != "NOPROTO" && $3 != "NODEF") {
printf("%s\t%s(struct thread *, struct %s *)",
rettype, funcname, argalias) > sysdcl
printf(";\n") > sysdcl
printf("#define\t%sAUE_%s\t%s\n", syscallprefix,
funcalias, auditev) > sysaue
}
- if (funcname == "nosys")
- nosys = 1
- if (funcname == "lkmnosys")
- lkmnosys = 1
printf("\t{ %s, (sy_call_t *)", argssize) > sysent
column = 8 + 2 + length(argssize) + 15
if ($3 == "NOIMPL") {
OpenPOWER on IntegriCloud