From owner-freebsd-threads@FreeBSD.ORG Thu Jul 31 23:56:48 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26E0F37B401 for ; Thu, 31 Jul 2003 23:56:48 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 758FC43F75 for ; Thu, 31 Jul 2003 23:56:47 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h716ugax004423; Fri, 1 Aug 2003 02:56:42 -0400 (EDT) Date: Fri, 1 Aug 2003 02:56:42 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Julian Elischer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: And problems regarding -lthr (1:1 KSE) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2003 06:56:48 -0000 On Thu, 31 Jul 2003, Julian Elischer wrote: > > On Fri, 1 Aug 2003, Mike Makonnen wrote: > > > On Fri, Aug 01, 2003 at 12:17:08PM +0900, TeJun Huh wrote: > > > I forgot to mention about -lthr (1:1 KSE threading) related problems. > > > > > > 1. If the program is compiled with '-static -lthr', the program > > > crashes at the first thread creation. Stack trace follows. > > > > Are you using 5.1-RELEASE or -CURRENT ? I think this has already > > been fixed in -CURRENT. > > > > > 2. Without -static, the program works fine, but pthread_create() > > > fails with EAGAIN at thread count 110. B.T.W. pthread_create() return > > > value handling was wrong in the example program. It always confuses > > > me. :-( How can I increase this limit? Again, I'm looking for > > > something like ten thousands. You can create thousands with libkse. You'll really only be limited by memory -- unless you create a lot of threads as PTHREAD_SCOPE_SYSTEM, in which case you'll likely have similar limitations as libthr. As julian said, libkse can be compiled to be in 1:1 mode, so if you build it that way (the default is M:N, not 1:1), you'll also be limited. -- Dan Eischen