All of lore.kernel.org
 help / color / mirror / Atom feed
* native vs posix threads mess
@ 2002-07-13 23:25 J.A. Magallon
  2002-07-14  3:45 ` Robert M. Hyatt
  0 siblings, 1 reply; 3+ messages in thread
From: J.A. Magallon @ 2002-07-13 23:25 UTC (permalink / raw)
  To: Lista Linux-SMP

Hi all...

This are just some comments, to see if somebody has any idea that can guide me
to make things the more 'linux' way...

Everybody says that POSIX threads in Linux suck. Well, I trusted them and begun
to order my ideas with clone() and make some tests. Easy things are easy.

Then you want mutexes. Try with semaphores. Use POSIX semaphores, look like more
standard. After some digging (manual page says nothing) and a couple of
failed links, I discover this:

werewolf:~/aleph/ask/lib/include/ast> cat /usr/lib/librt.so
/* GNU ld script
   librt.so.1 needs libpthread.so.0 to come before libc.so.6*
   in search scope.  */
GROUP ( /lib/libpthread.so.0 /lib/librt.so.1 )

So I can't get rid of -lpthread (and its <in>famous kernel call overriding).
Semaphores are implemented on top of POSIX threads ? Grr....
And I can not share sem_t over clone(). So what is it useful for ????

Lets try with SystemV. At least they resolve directly in libc.

People talk bad about pthreads, but looks like the only piece of order here.
If you do threads with clone(), how would you get mutexes and semaphores
and so on the 'linux' way ?

TIA

-- 
J.A. Magallon             \   Software is like sex: It's better when it's free
mailto:jamagallon@able.es  \                    -- Linus Torvalds, FSF T-shirt
Linux werewolf 2.4.19-rc1-jam3, Mandrake Linux 8.3 (Cooker) for i586
gcc (GCC) 3.1.1 (Mandrake Linux 8.3 3.1.1-0.7mdk)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-28 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-13 23:25 native vs posix threads mess J.A. Magallon
2002-07-14  3:45 ` Robert M. Hyatt
2002-08-28 21:32   ` E. Robert Bogusta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.