[PATCH 13/41] bsps/irq: Add rtems_interrupt_get_attributes()

Gedare Bloom gedare at rtems.org
Wed Jul 21 18:55:47 UTC 2021


Thank you for the clarification. I knew we discussed this recently and
didn't recall the outcome. This is fine, we can be nicer than (say)
compiler writers :)

On Wed, Jul 21, 2021 at 12:21 PM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 21/07/2021 20:14, Gedare Bloom wrote:
> >> +  memset( attributes, 0, sizeof( *attributes ) );
> >> +
> >> +  if ( !bsp_interrupt_is_valid_vector( vector ) ) {
> >> +    return RTEMS_INVALID_ID;
> >> +  }
> > I think do the error checking first, before changing the out parameters?
>
> Some users ignore return values. This way they get at least a
> deterministic result from the directive.  See:
>
> https://lists.rtems.org/pipermail/devel/2021-March/065840.html
>
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list