From owner-svn-src-user@FreeBSD.ORG Sat Feb 23 08:17:45 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 492B236E; Sat, 23 Feb 2013 08:17:45 +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 3C43F146; Sat, 23 Feb 2013 08:17:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1N8Hjxo017474; Sat, 23 Feb 2013 08:17:45 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1N8Hidg017472; Sat, 23 Feb 2013 08:17:44 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201302230817.r1N8Hidg017472@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 23 Feb 2013 08:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r247172 - in user/dchagin/lemul/sys: kern sys 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 08:17:45 -0000 Author: dchagin Date: Sat Feb 23 08:17:44 2013 New Revision: 247172 URL: http://svnweb.freebsd.org/changeset/base/247172 Log: In preparation for switching linuxulator to the use the native 1:1 threads split sys_thr_exit() up into sys_thr_exit() and kern_thr_exit(). Where the second will be used in linux_exit() system call later. Modified: user/dchagin/lemul/sys/kern/kern_thr.c user/dchagin/lemul/sys/sys/syscallsubr.h Modified: user/dchagin/lemul/sys/kern/kern_thr.c ============================================================================== --- user/dchagin/lemul/sys/kern/kern_thr.c Sat Feb 23 08:16:00 2013 (r247171) +++ user/dchagin/lemul/sys/kern/kern_thr.c Sat Feb 23 08:17:44 2013 (r247172) @@ -303,9 +303,6 @@ int sys_thr_exit(struct thread *td, struct thr_exit_args *uap) /* long *state */ { - struct proc *p; - - p = td->td_proc; /* Signal userland that it can free the stack. */ if ((void *)uap->state != NULL) { @@ -313,6 +310,16 @@ sys_thr_exit(struct thread *td, struct t kern_umtx_wake(td, uap->state, INT_MAX, 0); } + return (kern_thr_exit(td)); +} + +int +kern_thr_exit(struct thread *td) +{ + struct proc *p; + + p = td->td_proc; + rw_wlock(&tidhash_lock); PROC_LOCK(p); Modified: user/dchagin/lemul/sys/sys/syscallsubr.h ============================================================================== --- user/dchagin/lemul/sys/sys/syscallsubr.h Sat Feb 23 08:16:00 2013 (r247171) +++ user/dchagin/lemul/sys/sys/syscallsubr.h Sat Feb 23 08:17:44 2013 (r247172) @@ -223,6 +223,7 @@ int kern_symlink(struct thread *td, char enum uio_seg segflg); int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, enum uio_seg segflg); +int kern_thr_exit(struct thread *td); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg,