Date: Sat, 9 Jan 2016 14:33:10 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293478 - in stable/10/sys: amd64/linux32 compat/linux i386/linux Message-ID: <201601091433.u09EXAcD002091@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Jan 9 14:33:10 2016 New Revision: 293478 URL: https://svnweb.freebsd.org/changeset/base/293478 Log: MFC r283370: In preparation for switching linuxulator to the use the native 1:1 threads introduce linux_exit() stub instead of sys_exit() call (which terminates process). In the new linuxulator exit() system call terminates the calling thread (not a whole process). Modified: stable/10/sys/amd64/linux32/syscalls.master stable/10/sys/compat/linux/linux_fork.c stable/10/sys/i386/linux/syscalls.master Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/10/sys/amd64/linux32/syscalls.master Sat Jan 9 14:31:03 2016 (r293477) +++ stable/10/sys/amd64/linux32/syscalls.master Sat Jan 9 14:33:10 2016 (r293478) @@ -38,8 +38,7 @@ ; #ifdef's, etc. may be included, and are copied to the output files. 0 AUE_NULL UNIMPL setup -1 AUE_EXIT NOPROTO { void sys_exit(int rval); } exit \ - sys_exit_args void +1 AUE_EXIT STD { void linux_exit(int rval); } 2 AUE_FORK STD { int linux_fork(void); } 3 AUE_NULL NOPROTO { int read(int fd, char *buf, \ u_int nbyte); } Modified: stable/10/sys/compat/linux/linux_fork.c ============================================================================== --- stable/10/sys/compat/linux/linux_fork.c Sat Jan 9 14:31:03 2016 (r293477) +++ stable/10/sys/compat/linux/linux_fork.c Sat Jan 9 14:33:10 2016 (r293478) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <sys/sdt.h> #include <sys/sx.h> #include <sys/unistd.h> +#include <sys/wait.h> #ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> @@ -276,3 +277,16 @@ linux_clone(struct thread *td, struct li return (0); } + +int +linux_exit(struct thread *td, struct linux_exit_args *args) +{ + +#ifdef DEBUG + if (ldebug(exit)) + printf(ARGS(exit, "%d"), args->rval); +#endif + + exit1(td, W_EXITCODE(args->rval, 0)); + /* NOTREACHED */ +} Modified: stable/10/sys/i386/linux/syscalls.master ============================================================================== --- stable/10/sys/i386/linux/syscalls.master Sat Jan 9 14:31:03 2016 (r293477) +++ stable/10/sys/i386/linux/syscalls.master Sat Jan 9 14:33:10 2016 (r293478) @@ -37,8 +37,7 @@ ; #ifdef's, etc. may be included, and are copied to the output files. 0 AUE_NULL UNIMPL setup -1 AUE_EXIT NOPROTO { void sys_exit(int rval); } exit \ - sys_exit_args void +1 AUE_EXIT STD { void linux_exit(int rval); } 2 AUE_FORK STD { int linux_fork(void); } 3 AUE_NULL NOPROTO { int read(int fd, char *buf, \ u_int nbyte); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091433.u09EXAcD002091>