Date: Sun, 28 Mar 2004 23:41:56 -0800 From: Julian Elischer <julian@elischer.org> To: Niall Douglas <s_sourceforge@nedprod.com> Cc: freebsd-threads@freebsd.org Subject: Re: GDB 6.0 and FreeBSD threads Message-ID: <4067D344.8030403@elischer.org> In-Reply-To: <4067CC9B.8940.1A12F51@localhost> References: <4067688B.19545.1A50C1@localhost> <4067CC9B.8940.1A12F51@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
Niall Douglas wrote: > -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > > On 28 Mar 2004 at 21:13, Julian Elischer wrote: > > > > You must remember I've never been near FreeBSD before. When the man page says > POSIX threads are supported, I assumed that meant a full implementation in > libc_r as the man page specifies. You can see why I might think that, > especially as libc_r doesn't complain when my code sets PTHREAD_SCOPE_SYSTEM > which libc_r should return an error on by rights. On this topic, There are 3 separate compatible threads libraries Libc_r is only SCOPE_PROCESS, libpthreads implements SCOPE_PROCESS and SCOPE_SYSTEM, and libthr is only SCOPE_SYSTEM. Do you run ALL threads as scope system, or only some? We don't recommend COPE_SYSTEM unless it's really needed (for example to make some threads run at higher/lower priorities) as they are less efficient. Benchmark your app with both types. (I think Linux is only SCOPE_SYSTEM). > > BTW on my FreeBSD v5.2.1 the library is called libkse, not libpthread which > doesn't exist. > That's the problem with the fact that this field moving so quickly. You should probably upgrade to -current so that you can debug these threads. and get reeady for yur app to run on 5.3. > >>> You guys could seriously improve the documentation inside the man pages. >>> Please! Just a two line paragraph would have saved me more than a day of >>> work. >> >> we can't guess what question every developer is going to ask.. But possibly >> the following paragraph in "man pthread" might be made a bit clearer... > > > Typing man pthread on my FreeBSD v5.2.1 does not show the text you quoted. > Instead it says it's in libc_r and mentions nothing else. Hmm maybe it was added since.. oh well. At least you get to see that we are trying to cover the blank spots. > > >>> After linking to libkse and finding it really doesn't like coexisting >>> with libc_r, I discovered the libmap.conf trick and it works now. >>> Unfortunately I'm back to square one in that no gdb supports kse threads. >>> This is a major problem as my code is heavily multithreaded. >> >> why is libc_r beinbg linked into your application? you need to select ONE >> of the libraries and link with that.. > > > It's not me. I link against libGL and /it/ is linked against libc_r. warning: if you use the nvidia GL libraries you can not yet use libpthread. > > >> The threads support package is at: >> >> http://people.freebsd.org/~davidxu/kse/thread_db/ however, realise that >> this is PRE_ALPHA. you are "on your own" except for direct corespondence >> with david. > > > Wicked. I had searched google for that in vain so thank you. Do I post bug > reports here or to David directly? directly to david.. it's still in prerelease. Also, you MUST be running TODAY'S -current so you'll need to upgrade. Sorry but it's an area of active development. -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4067D344.8030403>