Bug 23316 - ISR detach/attach race
Summary: ISR detach/attach race
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: eCos
Classification: Retired
Component: Reference Guide
Version: CVS
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: ecc-bugs-int
QA Contact: ecc-bugs-int
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-04 14:53 UTC by Jesper Skov
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-06-20 15:49:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Jesper Skov 2001-01-04 14:53:02 UTC
Jesper Skov wrote:
> 
> Shouldn't the void Cyg_Interrupt::attach(void)/detach(void) functions
> disable interrupts? Otherwise they are not thread safe - and I don't
> believe there's any documentation that requires that all interrupt
> handlers must be set up before the scheduler starts [and even if there
> was, there should be an assertion to that effect].
> 
> Also, there's the potential for a race between those functions and an
> interrupt causing a chained list to be iterated.
[jifl:]
I would have thought the assumption is that it is up to the *caller* of
Cyg_Interrupt::attach/detach to disable interrupts if that's what's needed.
And in most cases the interrupt would be unmasked after it's attached
(unless there are chained ISRs, but that's for the user to worry about).

Perhaps the solution you really want is documentation?

Comment 1 Alex Schuilenburg 2003-06-20 15:49:32 UTC
This bug has moved to http://bugs.ecos.sourceware.org/show_bug.cgi?id>23316


Note You need to log in before you can comment on or make changes to this bug.