From owner-cvs-all@FreeBSD.ORG Thu Mar 3 16:57:55 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6113716A4CE; Thu, 3 Mar 2005 16:57:55 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46A8D43D39; Thu, 3 Mar 2005 16:57:55 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j23GvtTF093502; Thu, 3 Mar 2005 16:57:55 GMT (envelope-from sobomax@repoman.freebsd.org) Received: (from sobomax@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j23GvtS7093501; Thu, 3 Mar 2005 16:57:55 GMT (envelope-from sobomax) Message-Id: <200503031657.j23GvtS7093501@repoman.freebsd.org> From: Maxim Sobolev Date: Thu, 3 Mar 2005 16:57:55 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_prot.c src/sys/i386/linux linux_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 16:57:55 -0000 sobomax 2005-03-03 16:57:55 UTC FreeBSD src repository Modified files: sys/kern kern_prot.c sys/i386/linux linux_machdep.c Log: In linux emulation layer try to detect attempt to use linux_clone() to create kernel threads and call rfork(2) with RFTHREAD flag set in this case, which puts parent and child into the same threading group. As a result all threads that belong to the same program end up in the same threading group. This is similar to what linuxthreads port does, though in this case we don't have a luxury of having access to the source code and there is no definite way to differentiate linux_clone() called for threading purposes from other uses, so that we have to resort to heuristics. Allow SIGTHR to be delivered between all processes in the same threading group previously it has been blocked for s[ug]id processes. This also should improve locking of the same file descriptor from different threads in programs running under linux compat layer. PR: kern/72922 Reported by: Andriy Gapon Idea suggested by: rwatson Revision Changes Path 1.48 +19 -0 src/sys/i386/linux/linux_machdep.c 1.196 +12 -0 src/sys/kern/kern_prot.c