[Bug 2154] a bug : function bsp_interrupt_handler_remove in file c/src/lib/libbsp/shared/src/irq-generic.c
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Fri Nov 29 08:42:22 UTC 2013
https://www.rtems.org/bugzilla/show_bug.cgi?id=2154
Sebastian Huber <sebastian.huber at embedded-brains.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sebastian.huber at embedded-br
| |ains.de
--- Comment #1 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2013-11-29 02:42:22 CST ---
I don't see a problem here. The following test works well:
static void handler(void *arg)
{
}
static void visitor(void *varg, const char *name, rtems_option opt,
rtems_interrupt_handler hdl, void *harg
)
{
puts(name);
}
static void test(rtems_vector_number vector)
{
rtems_status_code sc;
sc = rtems_interrupt_handler_install(vector, "1", RTEMS_INTERRUPT_SHARED,
handler, (void *) 1);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_install(vector, "2", RTEMS_INTERRUPT_SHARED,
handler, (void *) 2);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_install(vector, "3", RTEMS_INTERRUPT_SHARED,
handler, (void *) 3);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_iterate(vector, visitor, NULL);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_remove(vector, handler, (void *) 2);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_iterate(vector, visitor, NULL);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_remove(vector, handler, (void *) 1);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_iterate(vector, visitor, NULL);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_remove(vector, handler, (void *) 3);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_iterate(vector, visitor, NULL);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_install(vector, "1", RTEMS_INTERRUPT_SHARED,
handler, (void *) 1);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_install(vector, "2", RTEMS_INTERRUPT_SHARED,
handler, (void *) 2);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_install(vector, "3", RTEMS_INTERRUPT_SHARED,
handler, (void *) 3);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_iterate(vector, visitor, NULL);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_remove(vector, handler, (void *) 1);
assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_interrupt_handler_iterate(vector, visitor, NULL);
}
Do you have a test case that shows the problem?
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list