On 01/07/2013 07:34 PM, Alun wrote:
Begin forwarded message:
Date: Mon, 7 Jan 2013 17:22:58 +0000
From: Alun <[email protected]>
To: Oliver Seitz <[email protected]>
Subject: Re: [jallib] Advice regarding variable access from interrupt
routines
[Also here for the list]
On Mon, 7 Jan 2013 09:05:04 -0800 (PST)
Oliver Seitz <[email protected]> wrote:
Just imagine, routine 2 always writes shortly after routine 1 does.
The value of routine 1 will never be read back, the easiest way then
would be not to implement routine 1 at all.
Well that would certainly save some time :-)
Thanks for your thoughts. I was worried I might be missing some simple
way to bypass the difficulty.
It's easy enough to build, by hand, safe access for each specific case
but, if I submit a library called "safe_concurrent_access.jal" and it's
not safe under all conditions I'm sure someone will manage to trigger
corruption and, rightly enough, call it a bug in the library.
Cheers,
Alun.
What about disabling interrupts in the mainline code, making
a copy of the variable and then enabling interrupts again?
Working with the copy should be safe ...
Greetings, Karin
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.