[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
Thu Dec 5 09:32:00 UTC 2013
https://www.rtems.org/bugzilla/show_bug.cgi?id=2154
--- Comment #2 from venture.g at gmail.com 2013-12-05 03:32:00 CST ---
yes, you are right.
Sorry, I am kind of carelessness. Maybe I should post my questions to the mail
list.
And confirm it before I submit it.
(In reply to comment #1)
> 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