From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <linuxppc-dev@lists.linuxppc.org>
Cc: <jeffk@jdkoftinoff.com>, <linuxppc-dev@lists.linuxppc.org>,
Jerry Van Baren <vanbaren_gerald@si.com>
Subject: Re: Having linking problems with atomic_inc(), atomic_dec_and_test() in user app, help!
Date: Fri, 4 Jan 2002 13:57:37 +0100 [thread overview]
Message-ID: <20020104125737.19448@smtp.noos.fr> (raw)
In-Reply-To: <5.1.0.14.2.20020104064034.0218c160@falcon.si.com>
>>I have what I hope is an easy question for you... I have am writing an
>>user-space application that does some multithreading (using pthreads), and
>>does some thread-safe reference counting by using the functions in
>>asm/atomic.h. Specifically, I'm using the atomic_inc(atomic_t *) and
>>atomic_dec_and_test(atomic_t *) functions.
Those are kernel functions, not availble to userland. If your userland
application need them, you have to either re-implement them, or rely on
equivalent routines provided by glibc if any.
If you plan to re-implement them, beware that some CPU-specific errata
have to be taken into account, you probably want to add all the sync's
that are CONFIG-dependant in the kernel in your userland implementation
for it to work properly on all PPC CPUs and on SMP machines.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-01-04 12:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-04 3:24 Having linking problems with atomic_inc(), atomic_dec_and_test() in user app, help! Jeremy Friesner
2002-01-04 11:46 ` Jerry Van Baren
2002-01-04 12:57 ` Benjamin Herrenschmidt [this message]
2002-01-04 14:18 ` Michael Schmitz
-- strict thread matches above, loose matches on Subject: below --
2002-01-04 17:00 jaf
2002-01-04 17:44 ` Michael Schmitz
2002-01-04 19:04 ` Tom Rini
2002-01-04 19:50 ` Having linking problems with atomic_inc(), atomic_dec_and_test()in " Frank Rowand
2002-01-04 19:52 ` Michael Schmitz
2002-01-04 18:33 ` Having linking problems with atomic_inc(), atomic_dec_and_test() in " Kevin B. Hendricks
2002-01-04 18:57 ` Kevin B. Hendricks
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=20020104125737.19448@smtp.noos.fr \
--to=benh@kernel.crashing.org \
--cc=jeffk@jdkoftinoff.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=vanbaren_gerald@si.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox