- To: eCos Discuss <ecos-discuss@xxxxxxxxxxxxxxxxxxx>
- Subject: DSR interruptible by scheduler + memory barriers
- From: Martin Laabs <martin.laabs@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 22 May 2012 20:01:34 +0200
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120329 Thunderbird/10.0.3
Hello,
unfortunately I couldn't find the answer in the documentation. If the
scheduler runs a DSR. Can this DSR become interrupted by an other thread or
another DSR? (Of cause an ISR can interrupt it)
The background is that I wanna share data between a thread an a DSR and
want to know whether I have to call cyg_(un)lock_scheduler when changing
the data.
And another question about that - how are memory barriers implemented in
eCos? (Are they implemented at all?)
Background: I have - for example - a status bit field that is copied to a
(ISR/DSR) shared variable in the ISR. Now - if the compiler decides to put
this variable into a register (in the ISR function) the DSR will get the
wrong data. I could of cause declare the variable as volatile but this
might be a performance issue in other cases where more data is affected.
Best regards,
Martin Laabs
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
[Linux Embedded]
[U-Boot V2]
[Linux Kernel]
[Linux MIPS]
[Linux ARM]
[Linux for the Blind]
[Linux Resources]
[Photo]
[Yosemite]
[ISDN Cause Codes]
[ECOS Home]
[Site Home]