From: "J.A. Magallon" <jamagallon@able.es>
To: Lista Linux-SMP <linux-smp@vger.kernel.org>
Subject: native vs posix threads mess
Date: Sun, 14 Jul 2002 01:25:19 +0200 [thread overview]
Message-ID: <20020713232519.GA9563@werewolf.able.es> (raw)
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)
next reply other threads:[~2002-07-13 23:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-13 23:25 J.A. Magallon [this message]
2002-07-14 3:45 ` native vs posix threads mess Robert M. Hyatt
2002-08-28 21:32 ` E. Robert Bogusta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020713232519.GA9563@werewolf.able.es \
--to=jamagallon@able.es \
--cc=linux-smp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.