diff options
author | kmacy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
commit | 99851f359e6f006b3223bb37dbc49e751ca8c13a (patch) | |
tree | 2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/sys/sysent.h | |
parent | bf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff) | |
download | FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.zip FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.tar.gz |
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.
Reviewed by: rwatson
Approved by: re (bz)
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r-- | sys/sys/sysent.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 90bce21..6a4b485 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -167,6 +167,14 @@ struct syscall_module_data { static struct sysent syscallname##_sysent = { \ (sizeof(struct syscallname ## _args ) \ / sizeof(register_t)), \ + (sy_call_t *)& sys_##syscallname, \ + SYS_AUE_##syscallname \ +} + +#define MAKE_SYSENT_COMPAT(syscallname) \ +static struct sysent syscallname##_sysent = { \ + (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ (sy_call_t *)& syscallname, \ SYS_AUE_##syscallname \ } @@ -207,6 +215,15 @@ struct syscall_helper_data { .new_sysent = { \ .sy_narg = (sizeof(struct syscallname ## _args ) \ / sizeof(register_t)), \ + .sy_call = (sy_call_t *)& sys_ ## syscallname, \ + .sy_auevent = SYS_AUE_##syscallname \ + }, \ + .syscall_no = SYS_##syscallname \ +} +#define SYSCALL_INIT_HELPER_COMPAT(syscallname) { \ + .new_sysent = { \ + .sy_narg = (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ .sy_call = (sy_call_t *)& syscallname, \ .sy_auevent = SYS_AUE_##syscallname \ }, \ |