Date: Thu, 27 Sep 2001 00:11:46 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: arch@FreeBSD.org Subject: makesyscalls.sh: Fix for NODEF type Message-ID: <20010927001146.A11131@athlon.pn.xcllnt.net>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi,
Background:
The Linuxulator port for alpha has the unique problem that
two syscall numbers/entries map to the same syscall function. The
syscall in question is setpgid()/linux_setpgid(). One of them is
nothing more than a stub to work around a limitation in our syscall
table generation. The following is a way to avoid having to create
a stub in this case.
When two identical syscalls are defined as having type NOPROTO, the
only problem that remains is the fact that there will be a duplicate
definition in *syscall.h. In sys/kern/makesyscalls.sh there's a way
to suppress this: mark the syscall as type NODEF. Unfortunately this
breaks the declaration of the syscall in *proto.h and is therefore
useless in it's current form.
The attached patch makes type NODEF work in follows. Assume we have
the following entry in syscalls.master:
1 NODEF BSD foobar
The only code generated for syscall 1 will be an entry in the
syscall table (struct sysent sysent[]):
{ AS(foobar_args), (sy_call_t *)foobar }, /* 1 = NODEF */
This allows syscall functions to have multiple syscall number or
entries.
Is this an acceptable fix and/or interpretation for NODEF?
--
Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
[-- Attachment #2 --]
Index: makesyscalls.sh
===================================================================
RCS file: /home/ncvs/src/sys/kern/makesyscalls.sh,v
retrieving revision 1.48
diff -u -r1.48 makesyscalls.sh
--- makesyscalls.sh 12 Sep 2001 08:37:45 -0000 1.48
+++ makesyscalls.sh 27 Sep 2001 06:50:59 -0000
@@ -208,6 +208,7 @@
}
if ($2 == "NODEF") {
funcname=$4
+ argssize = "AS(" $4 "_args)"
return
}
if ($f != "{")
@@ -320,7 +321,7 @@
argalias) > sysarg
}
if ($2 != "NOPROTO" && (!nosys || funcname != "nosys") && \
- (!lkmnosys || funcname != "lkmnosys")) {
+ (!lkmnosys || funcname != "lkmnosys") && $2 != "NODEF") {
printf("%s\t%s __P((struct thread *, struct %s *))",
rettype, funcname, argalias) > sysdcl
printf(";\n") > sysdcl
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010927001146.A11131>
