From owner-freebsd-current@FreeBSD.ORG Sun Aug 31 19:39:20 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42F4A16A4BF for ; Sun, 31 Aug 2003 19:39:20 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8234143F3F for ; Sun, 31 Aug 2003 19:39:19 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h812d6a8098278; Sun, 31 Aug 2003 21:39:06 -0500 (CDT) (envelope-from dan) Date: Sun, 31 Aug 2003 21:39:06 -0500 From: Dan Nelson To: rhett@alasir.com Message-ID: <20030901023905.GK7020@dan.emsphone.com> References: <20030901021331.82307.qmail@web21502.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030901021331.82307.qmail@web21502.mail.yahoo.com> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: current@freebsd.org Subject: Re: threading problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 02:39:20 -0000 In the last episode (Sep 01), RMH said: > Hello gentlemen, > > I seem to have threading problems with 5.1-RELEASE. Every time I run > a multithreaded application (linked against libc_r) on a SMP system, > I get only 1 CPU loaded at any moment given. I tried different Correct. libc_r is a userland threading library, which means that all threads run as a single plain process. Linuxthreads forks a new process for each thread. Try linking with -lkse or -lthr; both of these threading libraries allow multiple threads to run simultaneously on multiple CPUs. -- Dan Nelson dnelson@allantgroup.com