From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 14:40:32 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D84916A4CE for ; Sun, 20 Feb 2005 14:40:32 +0000 (GMT) Received: from agava.mipt.ru (ofc2.agava.net [81.5.88.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8579F43D5C for ; Sun, 20 Feb 2005 14:40:31 +0000 (GMT) (envelope-from rzhe@agava.com) Received: by agava.mipt.ru (Postfix, from userid 426) id 647239DA7E6; Sun, 20 Feb 2005 17:39:58 +0300 (MSK) Received: from mailhub (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 340699DA7DF for ; Sun, 20 Feb 2005 17:39:58 +0300 (MSK) Received: from rzhe.agava-dubna.local (unknown [213.33.195.194]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by agava.mipt.ru (Postfix) with ESMTP id DF26D9DA7E7 for ; Sun, 20 Feb 2005 17:39:57 +0300 (MSK) Date: Sun, 20 Feb 2005 17:40:28 +0300 From: Dmitry Agaphonov To: freebsd-hackers@freebsd.org Message-Id: <20050220174028.6efc483d.rzhe@agava.com> In-Reply-To: <20050209155136.GC65523@green.homeunix.org> References: <20050209173625.29d50ffd.rzhe@agava.com> <20050209144924.GB65523@green.homeunix.org> <20050209183952.30f4c5b6.rzhe@agava.com> <20050209155136.GC65523@green.homeunix.org> Organization: AGAVA Software X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: kqueue & pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 14:40:32 -0000 On Wed, 9 Feb 2005 10:51:36 -0500 Brian Fundakowski Feldman wrote: BFF> The LinuxThreads library seems to be the best-supported way. I don't think BFF> that there should be legal/licensing issues using it. Unfortunatelly, I can't use the LinuxThreads library, it simply does not compile on FreeBSD 4.10 (and I assume that on latest 4.x too) with gcc-3.4.4. Errors appear when it's building code from /usr/src tree with the newer compiler. FreeBSD 4.x is a mandatory target platform and using gcc-3.4 is a strong wish. So, I'm going to have kernel threads via rfork_thread(3) and the main question I stuck on is which libc functions I need to wrap to make them thread-safe and reentrant on multiprocessor systems, since rfork_thread(3)s are created with RFMEM flag and libc_r is not used. Could one give ideas or point where to read? Thanks!