svn commit: r283370 - in head/sys: amd64/linux32 compat/linux i386/linux
Dmitry Chagin
dchagin at FreeBSD.org
Sun May 24 14:33:21 UTC 2015
Author: dchagin
Date: Sun May 24 14:33:19 2015
New Revision: 283370
URL: https://svnweb.freebsd.org/changeset/base/283370
Log:
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).
Differential Revision: https://reviews.freebsd.org/D1027
Reviewed by: trasz
Modified:
head/sys/amd64/linux32/syscalls.master
head/sys/compat/linux/linux_fork.c
head/sys/i386/linux/syscalls.master
Modified: head/sys/amd64/linux32/syscalls.master
==============================================================================
--- head/sys/amd64/linux32/syscalls.master Sun May 24 14:29:35 2015 (r283369)
+++ head/sys/amd64/linux32/syscalls.master Sun May 24 14:33:19 2015 (r283370)
@@ -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: head/sys/compat/linux/linux_fork.c
==============================================================================
--- head/sys/compat/linux/linux_fork.c Sun May 24 14:29:35 2015 (r283369)
+++ head/sys/compat/linux/linux_fork.c Sun May 24 14:33:19 2015 (r283370)
@@ -41,6 +41,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>
@@ -297,3 +298,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: head/sys/i386/linux/syscalls.master
==============================================================================
--- head/sys/i386/linux/syscalls.master Sun May 24 14:29:35 2015 (r283369)
+++ head/sys/i386/linux/syscalls.master Sun May 24 14:33:19 2015 (r283370)
@@ -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); }
More information about the svn-src-head
mailing list