Commit Graph

85 Commits

Author SHA1 Message Date
pooka
2941a7af6e Include some headers to make rump_syscalls.h self-contained.
(not strictly correct wrt portability, but there are bigger fish
to saltgrill in that area)
2009-03-29 07:56:19 +00:00
pooka
0ef29cbdba Rename rump argument marshalling structure variable to "callarg" to
avoid collision with system calls which use "arg".
2009-03-18 17:27:04 +00:00
pooka
b50bd8632e Instead of linking rump system call entry points directly to the
backend, perform all calls through a syscall table.  This makes it
possible to make system calls to non-local rump kernels.
(requires a bit support code.  it's written but quite messy currently)
2009-02-20 17:56:36 +00:00
pooka
3e656734b8 cosmetic: don't print empty line at end of init_sysent.c 2009-02-14 16:21:23 +00:00
pooka
06abc8c3f9 Remove debug print -- this is what happens when there's several
hours between implementation and commit.
2009-01-23 19:29:38 +00:00
pooka
c7e5a8be4e Remove the "int *error" parameter from rump syscalls. Instead use
rumpuser_seterrno() to set the errno for the caller.  This makes
the difference between real and rump syscalls way less intrusive
in calling code.
2009-01-23 19:27:18 +00:00
pooka
32713ca49c Generate local prototypes in rump_syscalls.c and disallow using
the rump_syscalls.h interface from inside the rump kernel.
2009-01-14 19:40:30 +00:00
pooka
a9a2ce837b Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat).  Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().
2009-01-13 22:27:43 +00:00
pooka
71ef2103a7 Print delimiters around expected string in parse error message. 2009-01-13 16:29:19 +00:00
pooka
b2acbf4328 fix error message: expecting (, not ) 2009-01-13 16:25:43 +00:00
pooka
786ff94e12 <rump/rump_syscalls.h>, not "rump_syscalls.h" 2008-11-16 18:40:13 +00:00
ad
119366618e Atomic insertion/removal of groups of system call vectors at runtime with
a basic facility for rollback.

Proposed on tech-kern@.
2008-11-12 14:29:31 +00:00
pooka
3a64aae825 Fix previous: weak symbols work so much better if they are exported
from the object as weak symbols...

There's also something to be said about "cosmetic" tweaks after
testing, but I do think I'll bother.
2008-10-13 18:16:33 +00:00
pooka
cf05fbf706 Weak alias all rump system calls to rump_enosys() 2008-10-13 16:25:12 +00:00
pooka
23bef54996 For rumpsyscalls, properly return -1 in case of error. 2008-09-07 19:27:58 +00:00
apb
7cb9e72bbb Avoid using \$ in an awk script. Instead, store '$NetBSD$'
in an awk variable and interpolate it where needed.

Based on the patch by Martin Husemann in PR 38766.
2008-07-23 21:17:25 +00:00
ad
30abe39468 - Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
2008-04-24 11:51:18 +00:00
christos
4897e6c085 bring some stuff from time_t=64...
- add sysalign parameter to syscalls.conf
- add compat_50
2008-03-22 15:11:01 +00:00
njoly
d5bb355fe9 Handle rumpcalls/rumpcallshdr differently by always defining a default
value, which can be overwritten with syscalls.conf defines (just like
sys_nosys).

This fix a problem where rump awk variables are set to 0 value,
leading to the creation of an unexpected file with that name.

ok by pooka.
2008-03-18 12:36:15 +00:00
pooka
f2976c3905 Generate syscalls entry points which can be called directly without
going through a syscall trap.  These are currently useful for rumps.
As all the standard syscalls are not compiled into librump, mark
relevant ones with RUMP in syscalls.master.  To do e.g. a mkdir
"system call" from a rump, one would call

  rump_sys_mkdir("/dir", mode, &eval);

where the last value represents something to store errno into.
2008-03-11 22:50:10 +00:00
njoly
fcf1e44d76 Do not hardcode sys_stub to the string "sys_nosys" for the not ignored
case. Just use the corresponding variable instead, to allow emulation
to use their own defined value.
2008-03-10 14:06:46 +00:00
martin
a032b8dad3 Add a new syscall type IGNORED which just calls nullop (always succeeds
and does nothing).
2008-02-24 12:51:42 +00:00
yamt
80d10710d5 check off_t alignment. 2008-01-28 10:31:37 +00:00
dsl
7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
dsl
84e8b2869e Support "NOARGS INDIR" for compat_mach. 2007-11-10 13:22:11 +00:00
dsl
f4311cf9b6 Generate normal prototypes (etc) for INDIR calls (sys_syscall and sys___syscall)
just flag the entries as SYCALL_INDIRECT.
2007-11-09 14:54:13 +00:00
christos
3b5b073fd2 protect sys/syscall.h properly against multiple inclusion and make the
names of the protection macros consistent.
2005-12-03 17:04:36 +00:00
perry
aaec764348 get rid of trailing spaces in the "created from" line (constructed by
stripping the $s from $NetBSD$ in the source file.)
2005-02-26 23:32:31 +00:00
jdolecek
ca7fc04a65 use 'have_toupper' variable for awk toupper() function existence test, rather
than 'isgawk' - e.g. nawk has toupper() too
2004-09-12 11:24:15 +00:00
lukem
66ff0c053c Rename LIBCOMPAT* -> SYSLIBCOMPAT*, now that <bsd.own.mk> provides LIBCOMPAT.
Fixes kernel link problem noted by Sebastien Erard.
2004-07-31 00:55:51 +00:00
christos
a474dc2106 Keep track of which prototypes we declared already so that we don't
declare them again.
2003-09-30 20:34:28 +00:00
christos
71ee0b2991 - print comment in compat syscalls too.
- print ifdef's in the header files.
2003-09-11 13:59:49 +00:00
thorpej
e0d8d366df Merge the nathanw_sa branch. 2003-01-18 10:06:22 +00:00
lukem
bbfda04203 add RCSID to generated .c files 2001-11-12 14:57:02 +00:00
manu
40c8c13901 Made syscallargs.h lint-friendly, so that it can be included in libc sources
more easily.
2001-10-30 21:52:26 +00:00
wiz
fc687b32f5 Fix last commit: It's ">", not "<", in this case. Okay'd by christos. 2001-07-08 19:08:48 +00:00
christos
7d591946ec add verbiage to error 2001-07-08 18:57:50 +00:00
mrg
72d327d434 use _KERNEL_OPT not _KERNEL&&|_LKM 2001-05-30 11:27:46 +00:00
lukem
cdf90834d5 put TAB after #defines 2001-04-27 06:07:27 +00:00
jdolecek
466a79b36b Make it possible to use different function for unimplemented syscalls
than sys_nosys().
2001-03-30 16:56:36 +00:00
thorpej
1628dd441e Add a "sy_flags" to struct sysent, define a SYCALL_MPSAFE
system call flag (indicating that the kernel lock does not
need to be acquired when entering the kernel on that syscall).
2001-01-27 07:21:43 +00:00
jdolecek
df458f620b Avoid generating duplicate SYS_* defines to *syscall.h - is possible
for kern/syscalls.master's sys_getpid()/sys_getpid_with_ppid().
This fixes kern/11853 by Bernd Ernesti.
2001-01-01 16:41:43 +00:00
jdolecek
0c74ffb7fd if the third argument in syscall.conf matches [a-z0-9_], use it as
a function alias instead of the function name in { ... }
2000-12-12 17:32:45 +00:00
mycroft
8cb9be1967 s/unimplemented/filler/ 2000-12-09 05:41:12 +00:00
mycroft
23284f8acf Add another const. 2000-12-09 05:33:27 +00:00
mycroft
060456b651 Couple of changes:
* Make the syscallnames[] table const.
* Add a separator between the #include section and the syscalls section, so
  that #if/#else/#endif can be handled differently in the two.
* Add support for rounding up the size of the sysent table.
2000-12-09 05:27:08 +00:00
jdolecek
7d3a48b31d recognize ^if and ^endif in input master syscall file specially - output it
like #if and #endif to sysdcl; this can be used to insert ifdefs
to generated *sysent.c
2000-11-29 22:09:05 +00:00
jdolecek
78b866e95a change the type of *syscallnames[] array to 'const char * const foo[]' 2000-11-13 21:32:15 +00:00
cgd
6858b430d3 tweak white space around generated NetBSD rcs ids 2000-08-18 19:33:30 +00:00
cgd
c07a11c347 nuke __P for generated syscall prototypes and sy_call_t 2000-08-18 19:14:33 +00:00