From 0bcec9ba2d445878c5803de52fcffe6b5592b11e Mon Sep 17 00:00:00 2001 From: Hiten Pandya Date: Thu, 11 Mar 2004 09:53:19 +0000 Subject: [PATCH] Linux emulation system call update. Implement exit group of system calls needed for newer glibc binaries. The system calls are just wired to exit(2) right now, because we do not support Linux threading semantics very well. The update actually originated from OpenBSD, which then went into FreeBSD -HEAD CVS branch. Obtained from: Rahul Siddharthan and Kip Macy (old version) --- sys/emulation/linux/i386/linux_proto.h | 2 +- sys/emulation/linux/i386/linux_syscall.h | 5 ++- sys/emulation/linux/i386/linux_sysent.c | 48 ++++++++++++++++++++++- sys/emulation/linux/i386/linux_union.h | 2 +- sys/emulation/linux/i386/syscalls.master | 49 +++++++++++++++++++++++- 5 files changed, 100 insertions(+), 6 deletions(-) diff --git a/sys/emulation/linux/i386/linux_proto.h b/sys/emulation/linux/i386/linux_proto.h index f0c8af1d73..7e09d7b034 100644 --- a/sys/emulation/linux/i386/linux_proto.h +++ b/sys/emulation/linux/i386/linux_proto.h @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.11 2003/11/20 06:05:30 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.12 2004/03/11 09:53:19 hmp Exp $ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp */ diff --git a/sys/emulation/linux/i386/linux_syscall.h b/sys/emulation/linux/i386/linux_syscall.h index ea5393fed6..5fccc58760 100644 --- a/sys/emulation/linux/i386/linux_syscall.h +++ b/sys/emulation/linux/i386/linux_syscall.h @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.11 2003/11/20 06:05:30 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.12 2004/03/11 09:53:19 hmp Exp $ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp */ @@ -213,4 +213,5 @@ #define LINUX_SYS_linux_madvise 219 #define LINUX_SYS_linux_getdents64 220 #define LINUX_SYS_linux_fcntl64 221 -#define LINUX_SYS_MAXSYSCALL 222 +#define LINUX_SYS_exit_group 252 +#define LINUX_SYS_MAXSYSCALL 268 diff --git a/sys/emulation/linux/i386/linux_sysent.c b/sys/emulation/linux/i386/linux_sysent.c index 752fc79af0..a4b11115ce 100644 --- a/sys/emulation/linux/i386/linux_sysent.c +++ b/sys/emulation/linux/i386/linux_sysent.c @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.11 2003/11/20 06:05:30 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.12 2004/03/11 09:53:19 hmp Exp $ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp */ @@ -239,4 +239,50 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_madvise }, /* 219 = linux_madvise */ { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64 }, /* 220 = linux_getdents64 */ { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */ + { 0, (sy_call_t *)nosys }, /* 222 = none */ + { 0, (sy_call_t *)nosys }, /* 223 = none */ + { 0, (sy_call_t *)nosys }, /* 224 = linux_gettid */ + { 0, (sy_call_t *)nosys }, /* 225 = linux_readahead */ + { 0, (sy_call_t *)nosys }, /* 226 = linux_setxattr */ + { 0, (sy_call_t *)nosys }, /* 227 = linux_lsetxattr */ + { 0, (sy_call_t *)nosys }, /* 228 = linux_fsetxattr */ + { 0, (sy_call_t *)nosys }, /* 229 = linux_getxattr */ + { 0, (sy_call_t *)nosys }, /* 230 = linux_lgetxattr */ + { 0, (sy_call_t *)nosys }, /* 231 = linux_fgetxattr */ + { 0, (sy_call_t *)nosys }, /* 232 = linux_listxattr */ + { 0, (sy_call_t *)nosys }, /* 233 = linux_llistxattr */ + { 0, (sy_call_t *)nosys }, /* 234 = linux_flistxattr */ + { 0, (sy_call_t *)nosys }, /* 235 = linux_removexattr */ + { 0, (sy_call_t *)nosys }, /* 236 = linux_lremovexattr */ + { 0, (sy_call_t *)nosys }, /* 237 = linux_fremovexattr */ + { 0, (sy_call_t *)nosys }, /* 238 = linux_tkill */ + { 0, (sy_call_t *)nosys }, /* 239 = linux_sendfile64 */ + { 0, (sy_call_t *)nosys }, /* 240 = linux_futex */ + { 0, (sy_call_t *)nosys }, /* 241 = linux_sched_setaffinity */ + { 0, (sy_call_t *)nosys }, /* 242 = linux_sched_getaffinity */ + { 0, (sy_call_t *)nosys }, /* 243 = linux_set_thread_area */ + { 0, (sy_call_t *)nosys }, /* 244 = linux_get_thread_area */ + { 0, (sy_call_t *)nosys }, /* 245 = linux_io_setup */ + { 0, (sy_call_t *)nosys }, /* 246 = linux_io_destroy */ + { 0, (sy_call_t *)nosys }, /* 247 = linux_io_getevents */ + { 0, (sy_call_t *)nosys }, /* 248 = linux_io_submit */ + { 0, (sy_call_t *)nosys }, /* 249 = linux_io_cancel */ + { 0, (sy_call_t *)nosys }, /* 250 = linux_fadvise64 */ + { 0, (sy_call_t *)nosys }, /* 251 = */ + { AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 252 = exit_group */ + { 0, (sy_call_t *)nosys }, /* 253 = linux_lookup_dcookie */ + { 0, (sy_call_t *)nosys }, /* 254 = linux_epoll_create */ + { 0, (sy_call_t *)nosys }, /* 255 = linux_epoll_ctl */ + { 0, (sy_call_t *)nosys }, /* 256 = linux_epoll_wait */ + { 0, (sy_call_t *)nosys }, /* 257 = linux_remap_file_pages */ + { 0, (sy_call_t *)nosys }, /* 258 = linux_set_tid_address */ + { 0, (sy_call_t *)nosys }, /* 259 = linux_timer_create */ + { 0, (sy_call_t *)nosys }, /* 260 = linux_timer_settime */ + { 0, (sy_call_t *)nosys }, /* 261 = linux_timer_gettime */ + { 0, (sy_call_t *)nosys }, /* 262 = linux_timer_getoverrun */ + { 0, (sy_call_t *)nosys }, /* 263 = linux_timer_delete */ + { 0, (sy_call_t *)nosys }, /* 264 = linux_clock_settime */ + { 0, (sy_call_t *)nosys }, /* 265 = linux_clock_gettime */ + { 0, (sy_call_t *)nosys }, /* 266 = linux_clock_getres */ + { 0, (sy_call_t *)nosys }, /* 267 = linux_clock_nanosleep */ }; diff --git a/sys/emulation/linux/i386/linux_union.h b/sys/emulation/linux/i386/linux_union.h index 8a124cb2e1..e41d83aec8 100644 --- a/sys/emulation/linux/i386/linux_union.h +++ b/sys/emulation/linux/i386/linux_union.h @@ -2,7 +2,7 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_union.h,v 1.7 2003/11/20 06:05:30 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/i386/linux_union.h,v 1.8 2004/03/11 09:53:19 hmp Exp $ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp */ diff --git a/sys/emulation/linux/i386/syscalls.master b/sys/emulation/linux/i386/syscalls.master index 04d1dc7a15..cf36354474 100644 --- a/sys/emulation/linux/i386/syscalls.master +++ b/sys/emulation/linux/i386/syscalls.master @@ -1,4 +1,4 @@ - $DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp $ + $DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.5 2004/03/11 09:53:19 hmp Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; $FreeBSD: src/sys/i386/linux/syscalls.master,v 1.30.2.8 2003/01/02 20:41:33 kan Exp $ @@ -339,3 +339,50 @@ l_uint count); } 221 STD LINUX { int linux_fcntl64(l_uint fd, l_uint cmd, \ l_ulong arg); } +222 UNIMPL LINUX none +223 UNIMPL LINUX none +224 UNIMPL LINUX linux_gettid +225 UNIMPL LINUX linux_readahead +226 UNIMPL LINUX linux_setxattr +227 UNIMPL LINUX linux_lsetxattr +228 UNIMPL LINUX linux_fsetxattr +229 UNIMPL LINUX linux_getxattr +230 UNIMPL LINUX linux_lgetxattr +231 UNIMPL LINUX linux_fgetxattr +232 UNIMPL LINUX linux_listxattr +233 UNIMPL LINUX linux_llistxattr +234 UNIMPL LINUX linux_flistxattr +235 UNIMPL LINUX linux_removexattr +236 UNIMPL LINUX linux_lremovexattr +237 UNIMPL LINUX linux_fremovexattr +238 UNIMPL LINUX linux_tkill +239 UNIMPL LINUX linux_sendfile64 +240 UNIMPL LINUX linux_futex +241 UNIMPL LINUX linux_sched_setaffinity +242 UNIMPL LINUX linux_sched_getaffinity +243 UNIMPL LINUX linux_set_thread_area +244 UNIMPL LINUX linux_get_thread_area +245 UNIMPL LINUX linux_io_setup +246 UNIMPL LINUX linux_io_destroy +247 UNIMPL LINUX linux_io_getevents +248 UNIMPL LINUX linux_io_submit +249 UNIMPL LINUX linux_io_cancel +250 UNIMPL LINUX linux_fadvise64 +251 UNIMPL LINUX +252 NOPROTO LINUX { void sys_exit(int rval); } exit_group sys_exit_args void +253 UNIMPL LINUX linux_lookup_dcookie +254 UNIMPL LINUX linux_epoll_create +255 UNIMPL LINUX linux_epoll_ctl +256 UNIMPL LINUX linux_epoll_wait +257 UNIMPL LINUX linux_remap_file_pages +258 UNIMPL LINUX linux_set_tid_address +259 UNIMPL LINUX linux_timer_create +260 UNIMPL LINUX linux_timer_settime +261 UNIMPL LINUX linux_timer_gettime +262 UNIMPL LINUX linux_timer_getoverrun +263 UNIMPL LINUX linux_timer_delete +264 UNIMPL LINUX linux_clock_settime +265 UNIMPL LINUX linux_clock_gettime +266 UNIMPL LINUX linux_clock_getres +267 UNIMPL LINUX linux_clock_nanosleep + -- 2.41.0