From owner-freebsd-hackers Wed Aug 5 01:09:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA07239 for freebsd-hackers-outgoing; Wed, 5 Aug 1998 01:09:00 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA07234 for ; Wed, 5 Aug 1998 01:08:56 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id SAA27521; Wed, 5 Aug 1998 18:13:13 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199808050813.SAA27521@cimlogic.com.au> Subject: Re: Threaded X libs.. In-Reply-To: <199808050636.QAA15087@cain.gsoft.com.au> from Daniel O'Connor at "Aug 5, 98 04:06:22 pm" To: doconnor@gsoft.com.au (Daniel O'Connor) Date: Wed, 5 Aug 1998 18:13:13 +1000 (EST) Cc: stevel@mail.cdsnet.net, doconnor@gsoft.com.au, tlambert@primenet.com, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel O'Connor wrote: > > > > OK, so change it to -lc_r on -stable.. > > Just finished a build of XF86 3.3.2.3 on -stable with the above, and no go. > > I couldn't see how -pthread would work either?? Also tried -lc_r and no go > > either. > Hmm.. I did it on -current with no problems. > What was your error? -pthread was added to gcc first in -current, then to -stable after the release of 2.2.6. All it does is to use libc_r instead of libc. Linking with -lc_r, but no -nostdlib means that you risk getting functions from libc if the symbols aren't in libc_r. The only one that comes to mind is poll(). If XFree86 uses poll() instead of select(), you can expect to have problems. It's been a while since I looked at XFree86 thread code, but I remember something about a single socket to the connected display, with no way to have a connection per dialog. You lose some of the benefits of threading by having a single socket. It depends on your application, but I don't like mine performing at the speed of X. I always code the X calls in the initial thread and let all the background threads buffer commands for it that are processed as soon as it can. YMMV. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message