Opened on 01/23/23 at 11:37:56
Last modified on 01/24/23 at 10:30:12
#4815 assigned defect
Function defined in header file
Reported by: | Daniel Páscoa | Owned by: | Needs Funding |
---|---|---|---|
Priority: | normal | Milestone: | 7.1 |
Component: | unspecified | Version: | 6 |
Severity: | normal | Keywords: | qualification |
Cc: | Blocked By: | ||
Blocking: |
Description
Description:
The functions found in the file bsps\shared\cache\cacheimpl.h should not be defined in this location. These functions have already been declared in cpukit/include/rtems/rtems/cache.h, so their definition should not be placed in a header file. Even though it is an *impl.h file, this type of file is intended for the definition of inline functions only, not for static functions, as per page 163 of RTEMS Software Engineering. To comply with the guidelines, please consider declaring the functions in a header file and defining them in a source file, as outlined in section 6.3.1.4 of the RTEMS Software Engineering.
It is recommended to declare and define the static function Clock_driver_timecounter_tick, located in the file bsps\shared\dev\clock\clockimpl.h, at the start of a source file rather than a header file. This is in accordance with the guidelines outlined on page 163 of RTEMS Software Engineering. To comply with these guidelines, consider moving the declaration and definition of the function to the start of a source file instead of keeping it in the header file.
It has also been noticed that the global functions present in the file cpukit\include\rtems\confdefs\newlib.h and the global functions void Clock_isr, rtems_isre Clock_isr and _Clock_Initialize from file bsps\shared\dev\clock\clockimpl.h are declared and defined in a header file. It is recommended to consider separating the declaration and definition of these functions by declaring them in a header file and defining them in a source file. Alternatively, if appropriate, they can be set as inline functions.
The attached excel lists in a systematic way the sources where this issue applies.
Additional Notes:
This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-026.
File list (please check the attached excel for more information):
bsps\shared\cache\cacheimpl.h
bsps\shared\dev\clock\clockimpl.h
cpukit\include\rtems\confdefs\newlib.h
Attachments (1)
Change History (4)
Changed on 01/23/23 at 11:38:10 by Daniel Páscoa
Attachment: | RTEMS-SMP-CODE-VER-026.xlsx added |
---|
comment:1 Changed on 01/23/23 at 13:03:29 by Sebastian Huber
comment:2 Changed on 01/23/23 at 13:06:26 by Sebastian Huber
Keywords: | qualification added |
---|
comment:3 Changed on 01/24/23 at 10:30:12 by Sebastian Huber
Component: | admin → unspecified |
---|---|
Milestone: | → 7.1 |
Owner: | set to Needs Funding |
Status: | new → assigned |
Version: | → 6 |
The header files are fine as is. Maybe we should clarify the coding guide lines.