pthread_mutex_timedlock on sparc64
carton at Ivy.NET
Thu Apr 20 19:49:20 UTC 2006
>>>>> "kk" == Kris Kennaway <kris at obsecurity.org> writes:
kk> Then we can make libthr the default on FreeBSD 6.x as well.
1. is libpthread a real library or a placeholder that you point at
your choice of thread implementation?
2. How many native thread implementations are there (in the base
system), working or not on all FreeBSD versions? Two? Or three?
3. What libraries do you link for each?
On NetBSD, I type -lpthread and get Scheduler Activations. no
choosing. Either it works or it doesn't.
On Solaris, if I type 'man pthreads' or 'man threads' it'll tell me
they have two thread implementations, and it'll tell meq how to choose
which one I want. I think in Solaris 8 they had four. I don't have
Solaris 8 so I could be wrong about how to choose them, but as an
example for what I want to know about FreeBSD:
-mt Solaris threads \
-mt -lpthread POSIX threads / MxN threads
-mt -L/usr/lwp/lib Solaris threads \
-mt -L/usr/lwp/lib -lpthread POSIX threads / 1:1 threads
so, if I want POSIX threads I add the -lpthread wrapper. It's not a
placeholder---it's a wrapper around libthread which is always there,
different from FreeBSD? If I want 1:1 threads rather than MxN
threads, I searach the libraries from /usr/lwp/lib first. Definitely
different from FreeBSD which uses libmap.conf instead of -L?
I'm hearing that FreeBSD has 1:N threads, MxN threads, and 1:N
threads. And that they're all POSIX (-lpthread style) threads. ok,
But in kse(2) you guys call 1:N threads ``N to 1'' threads. And you
call 1:1 threads ``N to N'' threads. confusing. But I don't know how
to choose which I want of 1:N, 1:1, or MxN. I also don't know which
are available/working on which architectures and releases---that of
course changes, but maybe there's a place to explain at least how to
choose and what you're choosing, which shouldn't change as things are
fixed and retired?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 304 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-sparc64/attachments/20060420/06183cdc/attachment.pgp
More information about the freebsd-sparc64