Legacy Networking | sonic.c: Replace set_vector with rtems_interrupt_catch (!27)
Vijay Banerjee (@vijay)
gitlab at rtems.org
Mon Oct 27 16:34:33 UTC 2025
Vijay Banerjee commented on a discussion on bsps/shared/net/sonic.c: https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/merge_requests/27#note_135367
> */
>
> /* Ignore returned old handler */
> - (void) set_vector(sonic_interrupt_handler, sc->vector, 1);
> + rtems_interrupt_catch(sonic_interrupt_handler,
> + sc->vector,
> + &old_isr_entry);
> + SPARC_Clear_and_unmask_interrupt(sc->vector);
@gedare I found the `rtems_interrupt_clear` and `rtems_interrupt_vector_enable` directives in the manual:
[rtems_interrupt_vector_enable](https://docs.rtems.org/docs/main/c-user/interrupt/directives.html#rtems-interrupt-vector-enable)
[rtems_interrupt_clear](https://docs.rtems.org/docs/main/c-user/interrupt/directives.html#rtems-interrupt-clear)
These functions internally call the `BSP_Clear_interrupt` and `BSP_Unmask_interrupt`. Should I change the patch to have the following order?
```
rtems_interrupt_catch
rtems_interrupt_clear
rtems_interrupt_vector_enable
```
--
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/merge_requests/27#note_135367
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251027/24edc9a9/attachment-0001.htm>
More information about the bugs
mailing list