From owner-svn-src-user@FreeBSD.ORG Sat Feb 23 07:55:28 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 49423E4F; Sat, 23 Feb 2013 07:55:28 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 23EE76D; Sat, 23 Feb 2013 07:55:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1N7tSA2010746; Sat, 23 Feb 2013 07:55:28 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1N7tR2Q010743; Sat, 23 Feb 2013 07:55:27 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201302230755.r1N7tR2Q010743@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 23 Feb 2013 07:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r247169 - in user/dchagin/lemul/sys: amd64/linux32 compat/linux i386/linux X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2013 07:55:28 -0000 Author: dchagin Date: Sat Feb 23 07:55:27 2013 New Revision: 247169 URL: http://svnweb.freebsd.org/changeset/base/247169 Log: In preparation for switching linuxulator to the use the native 1:1 threads introduce linux_exit() stub instead of calling sys_exit() call (which terminates process). In the new linuxulator exit() system call terminates the calling thread (not a whole process). Modified: user/dchagin/lemul/sys/amd64/linux32/syscalls.master user/dchagin/lemul/sys/compat/linux/linux_fork.c user/dchagin/lemul/sys/i386/linux/syscalls.master Modified: user/dchagin/lemul/sys/amd64/linux32/syscalls.master ============================================================================== --- user/dchagin/lemul/sys/amd64/linux32/syscalls.master Sat Feb 23 07:51:33 2013 (r247168) +++ user/dchagin/lemul/sys/amd64/linux32/syscalls.master Sat Feb 23 07:55:27 2013 (r247169) @@ -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: user/dchagin/lemul/sys/compat/linux/linux_fork.c ============================================================================== --- user/dchagin/lemul/sys/compat/linux/linux_fork.c Sat Feb 23 07:51:33 2013 (r247168) +++ user/dchagin/lemul/sys/compat/linux/linux_fork.c Sat Feb 23 07:55:27 2013 (r247169) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef COMPAT_LINUX32 #include @@ -298,3 +299,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: user/dchagin/lemul/sys/i386/linux/syscalls.master ============================================================================== --- user/dchagin/lemul/sys/i386/linux/syscalls.master Sat Feb 23 07:51:33 2013 (r247168) +++ user/dchagin/lemul/sys/i386/linux/syscalls.master Sat Feb 23 07:55:27 2013 (r247169) @@ -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); }