Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 1998 18:13:13 +1000 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        doconnor@gsoft.com.au (Daniel O'Connor)
Cc:        stevel@mail.cdsnet.net, doconnor@gsoft.com.au, tlambert@primenet.com, hackers@FreeBSD.ORG
Subject:   Re: Threaded X libs..
Message-ID:  <199808050813.SAA27521@cimlogic.com.au>
In-Reply-To: <199808050636.QAA15087@cain.gsoft.com.au> from Daniel O'Connor at "Aug 5, 98 04:06:22 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808050813.SAA27521>