From: Michael Schnell <mschnell@lumino.de>
To: Giuseppe Calderaro <giuseppecalderaro@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
nios2-dev <nios2-dev@sopc.et.ntust.edu.tw>
Subject: Re: atomic RAM ?
Date: Thu, 08 Apr 2010 12:12:18 +0200 [thread overview]
Message-ID: <4BBDAC02.500@lumino.de> (raw)
In-Reply-To: <k2gbca41b4c1004080243nc45a10aereaae18557808c943@mail.gmail.com>
On 04/08/2010 11:43 AM, Giuseppe Calderaro wrote:
>
> In the past I used the mutex connected to the avalon bus to get atomic
> test and set instructions:
> http://www.altera.com/literature/hb/nios2/n2cpu_nii51020.pdf
>
Of course I do know the Altera hardware Mutex, but same just implements
a single Mutex. To allow for FUTEX, which is the base of doing threaded
application with the pthread functions provided by libc, the application
programmer can create any number of pthread_mutex'es (of course a decent
restriction by hardware to some 1000 would usually not harm with typical
embedded applications).
Of course a multithreaded application should not be done in an
architecture depending way, but should be compilable for any arch and
thus the count of allowable pthread_mutex'es should not be greatly
restricted by the underlying hardware (be it NIOS or whatever else).
Of course you are right that using custom instructions to do a decent
count of atomic (hardware-) mutex'es necessary for implementing decent
SMP aware FUTEX (or even Kernel Mutex) stuff with NIOS and similar archs
is not strictly necessary, but I think it's handy to use them instead of
I/O-elements, as the MMU would disallow user space access to "normal"
I/O addresses.
Michael
next prev parent reply other threads:[~2010-04-08 10:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 7:32 atomic RAM ? Michael Schnell
[not found] ` <4BBDA1CB.3070204@davidnewall.com>
2010-04-08 9:52 ` Michael Schnell
2010-04-12 12:54 ` Pavel Machek
2010-04-14 8:42 ` Michael Schnell
[not found] ` <k2gbca41b4c1004080243nc45a10aereaae18557808c943@mail.gmail.com>
2010-04-08 10:12 ` Michael Schnell [this message]
2010-04-08 10:45 ` Alan Cox
2010-04-08 12:11 ` Michael Schnell
2010-04-08 12:14 ` David Miller
2010-04-08 12:30 ` Michael Schnell
2010-04-08 14:15 ` Arnd Bergmann
2010-04-09 10:54 ` Michael Schnell
[not found] ` <4BBEECC8.10005@lumino.de>
[not found] ` <201004091714.04990.arnd@arndb.de>
2010-04-12 9:58 ` Michael Schnell
2010-04-12 15:02 ` Arnd Bergmann
2010-04-13 10:11 ` Michael Schnell
[not found] ` <u2j42b5547a1004120845x87d7f2f7wd4acea1144153dd6@mail.gmail.com>
2010-04-13 8:39 ` [Nios2-dev] " Michael Schnell
2010-04-08 13:37 ` Alan Cox
2010-04-09 10:55 ` Michael Schnell
2010-04-09 11:54 ` Alan Cox
2010-04-09 12:53 ` Michael Schnell
2010-04-09 13:15 ` Alan Cox
2010-04-09 13:14 ` Michael Schnell
2010-04-09 13:32 ` Michael Schnell
2010-04-14 12:46 ` Michael Schnell
2010-04-14 12:57 ` Alan Cox
2010-04-14 14:38 ` Michael Schnell
2010-04-09 1:36 ` Mike Frysinger
2010-04-09 9:23 ` Michael Schnell
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=4BBDAC02.500@lumino.de \
--to=mschnell@lumino.de \
--cc=giuseppecalderaro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nios2-dev@sopc.et.ntust.edu.tw \
/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.