Commit Graph

13461 Commits

Author SHA1 Message Date
Joel Sherrill
7f77dfae60 cpukit libfs: Address -Wsign-compare warnings
Also includes a related libio change.

Most of these warnings were between int or ssize_t and size_t.
In particular, various POSIX system calls like read() and write()
return ssize_t and comparing that value with the sizeof a buffer
is a common source of these warnings. Another common source is
using an int as the iterator in a for loop with the limit being
a size_t.

With the type change, some printf() specifiers needed to change also.
2026-01-22 15:34:36 -06:00
Joel Sherrill
9c40ad753f cpukit: Address files with only Eric Valette's email address
Many files with Eric Valette as author only had his email address.
This led to them being missed in previous relicensing passes.
This effort relicensed where possible and made efforts to have the
file follow the RTEMS standard for top of files (SPDX, Doxygen,
and then copyright/license).

Updates #5418.
2026-01-16 09:12:24 -06:00
Allan Hessenflow
fcfa71aa1c cpukit/posix/src/aio-misc.c: initialize suspendcbp
Closes #5421
2026-01-15 10:36:16 -08:00
Joel Sherrill
5e80d1077b cpukit/libmisc/untar/untar.c: Correct third argument
The call to Untar_FromMemory_Print() on line 400 was passing
false as the third argument. "rtems_printer *" was expected.
In C previous to C23, false was a macro defined as 0 and could
be converted to a pointer. In C23, false, true, and bool are keywords.
2026-01-14 16:27:07 -06:00
Sam Price
3b78fa9013 microblaze: enhance exception diagnostics
Improve MicroBlaze exception printing by showing the faulting PC,
decoding ESR exception codes, and reporting the ESR description
to aid debugging.
2026-01-08 17:43:37 -06:00
Michal Lenc
40305e360f can: fix -Wsign-compare warnings
Fixes -Wsign-compare compile warnings in CAN code. This introduces
the change in rtems_ctucanfd_initialize where ntxbufs is changed from
int to unsigned int, thus making the ntxbufs < 0 obsolete.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-12-18 19:14:40 -06:00
Dhruva P V
69a9314281 score: check previous in _Chain_Is_node_off_chain()
Previously, the function returned true when node->next == NULL, but did
not verify that node->previous was also NULL.

The updated implementation checks the node->next == NULL and in
RTEMS_DEBUG it checks node->previous == NULL before reporting the
node is off-chain.

These changes ensure that the off-chain invariant is verified in
the RTEMS_DEBUG

This change Updates RTEMS issue #4812.
2025-12-18 00:37:41 +05:30
Asif Khan
ff0c71388a cpukit/score: Remove extra blank paragraph in copyrt.h
This change eliminates an unnecessary blank paragraph in
cpukit/include/rtems/score/copyrt.h. RTEMS documentation requires single
spaced paragraphs, and the previous formatting contained consecutive
blank lines.

The modification is formatting-only and has no functional impact.

Updates #4807.
2025-12-12 11:07:00 -06:00
Asif Khan
9e93d0bc29 cpukit/rtems: Remove extra blank paragraph in barrierdata.h
This patch removes a superfluous blank paragraph from
cpukit/include/rtems/rtems/barrierdata.h. The formatting issue created
two consecutive blank lines inside the documentation block, which is not
permitted by RTEMS style rules.

This update improves documentation consistency without altering runtime
behavior.

Updates #4807.

Signed-off-by: Asif Khan <asif21012006@gmail.com>
2025-12-12 11:07:00 -06:00
Asif Khan
d96b5c6de6 cpukit/confdefs: Remove extra blank paragraph in iodrivers.h
This patch removes an unnecessary blank paragraph in
cpukit/include/rtems/confdefs/iodrivers.h to comply with RTEMS
documentation formatting guidelines. Only one blank line should separate
paragraphs, and this change enforces that rule.

Updates #4807.
2025-12-12 11:07:00 -06:00
Joel Sherrill
089a16b6e8 cpukit/dev/can/can-bus.c: Address type-limits warnings
These changes were made to address GCC -Wtype-limits warnings.
In this case, the variables were unsigned and there was no need to
check them for being <= 0.

Updates #5388.
2025-12-11 23:53:16 +00:00
Bhavya Shah
1b440d2807 imfs/large_block_size: Modified imfs for large block size
- Added testcase psximfs04 to test the block size
- Modified confdefs/libio.h for block size 1024
2025-12-11 17:51:35 -06:00
Bhavya Shah
6367099ec0 imfs/user_allocator: Add user-configurable allocator support
- Extend IMFS and libio headers to define default allocator/deallocator ops
  and logic for configuring memfile_ops.
- Update imfs_memfile to use custom allocators for memory blocks.
- Fix imfs_statvfs.f_bfree calculation to respect user-defined ops.
- Add psximfs03 test case to validate custom allocator behavior.
- Refactor psximfs01 to share helper functions with psximfs03.
2025-12-11 17:45:13 -06:00
Mazen Adel Elmessady
ff63275812 cpukit/posix: Add timespec_get() support to RTEMS
Added the implementation of timespec_get() with tests.
The implementation used clock_gettime() as a reference.
The tests used psxtimes01 as a reference.

Updates
rtems/programs/gsoc#69
2025-12-05 17:00:55 -05:00
Kinsey Moore
d82efbd7d1 bsps/shared/dev/nor: Add SFDP and CFI parsers
Fixed flashdev doxygen group
2025-12-04 18:52:00 -06:00
Joel Sherrill
cc9aa4b748 ino_t printf() cases: Add PRIdinod_t for ino_t format specifier
The sizeof(ino_t) can potentially vary based on the target. This
resulted in -Wformat warnings. Add PRIdino_t in <rtems/inttypes.h>
to have a portable format specifier.

Closes #5393.
2025-12-04 18:41:19 -06:00
Joel Sherrill
136f739ff9 cpukit/.../rtems-fdt/rtems-fdt-shell.c: Fix format specifier warning
This was using a * to specify the field width. The value passed
should be an int.
2025-12-04 17:56:14 -06:00
Joel Sherrill
c17b07c646 cpukit/libdl/rtl-elf.c: Use format specifier for size_t
This addresses -Wformat warnings.
2025-12-04 17:56:14 -06:00
Joel Sherrill
c06fb873eb fdt/rtems-fdt-shell.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
c957d1a202 bspcmdline_getparam.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
d237626773 cpukit/libfs: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
1159a8cd33 drvmgr_translate.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
f06b83734b cpukit/include/rtems/score/todimpl.h: Use sizesuffix on constants
This was necessary to make the constants the proper signedness
in comparisons.
2025-12-04 18:46:23 -05:00
Joel Sherrill
f8a2b1f06b cpukit/rtl-*: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
426f938869 cpukit/.../flashdev.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
ce1d611048 cpukit/posix/src/mmap.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
3c2592be04 cpukit/libmisc/shell: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Joel Sherrill
fc6cc44de9 cpukit/libdl: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-12-04 18:46:23 -05:00
Kinsey Moore
710a6e124e cpukit/jffs2,spec: Add summary support to the build
This adds summary support to the build with a global option to enable
this support and necessary changes to the imported summary support
source to integrate it into the build system and resolve errors.
2025-12-03 15:48:56 -06:00
Kinsey Moore
e3b9015bfa cpukit/jffs2: Import summary support and direct write helpers
This imports the unmodified summary.c and writev.c support files from
upstream matching the current version of other imports.
2025-12-03 15:48:56 -06:00
Karthikey Kadati
0b20605792 sparc: Remove redundant 'register' specifier from cpuimpl.h
This patch removes the redundant register keyword and switches to inline
assembly for g7 assignment as per review feedback.
2025-12-02 12:11:52 -06:00
Kinsey Moore
7cc3bb777c cpukit,spec: Swap JFFS2 to zlib CRC32
Move JFFS2 from the Cygwin implementation of CRC32 to the zlib
implementation which can take advantage of hardware acceleration and
reduces code duplication. Synthetic benchmarks on AArch64 hardware show
approximately a 17x improvement in CRC32 calculation speed and
real-world testing with JFFS2 shows a 1% improvement in mount times, a
5% improvement in data write times, and a 9% improvement in garbage
collection times.

A test was written to compare hash generation between the two algorithms
and a partition was created with one and then remounted with the other
with no errors.
2025-12-02 08:59:37 -06:00
Sepehr Ganji
330c70c565 libfs/fatfs: Update FatFS to R0.16
This updates the FatFS to R0.16 revision
of upstream and updates the cppflags.
2025-12-01 09:16:31 -06:00
Sam Price
e96fd2398b MicroBlaze RTL: handle MB 33 and add rtl log
- puts the last rtl errorr message out near end of rtl messge.
- Also adds microblaze type 33 to microblaze handler
2025-11-28 01:01:57 -05:00
Martin Erik Werner
e727b24ea3 cpukit: Add msg broadcast non-atomicity to doc
rtems_message_queue_broadcast() may, under certain circumstances, copy
the message to tasks which were not waiting on the message queue when
the broadcast started, and may copy the message multiple times to the
same task.

This behaviour is, based on discussion in #4804, something that might
not change in the short term, so expose it in the user documentation.

The wording is copied with modifications from an existing internal
requirements note.

Also correct "none-atomic" -> "non-atomic" in said internal requirements
note.

The changes were auto-generated from rtems-central.
2025-11-20 22:09:39 -06:00
Gedare Bloom
c951686b13 cpukit: Use CONFIGURE_MAXIMUM_PRIORITY with EDF
Uses the CONFIGURE_MAXIMUM_PRIORITY to set the priority range for
EDF and CBS schedulers under the control of applications.
The default priority behavior is now the same as other schedulers.
The user API to get a task's current priority returns 0 for deadline
driven tasks.

Fixes #5390
2025-11-17 16:25:27 -07:00
Sepehr Ganji
bff18c05b9 libfs/fatfs: Add FatFS with tests
This adds FatFS wrapper layer to RTEMS
including tests as part of GSoC 2025.
2025-11-10 16:09:07 -07:00
Kinsey Moore
e3592620d7 cpukit/flashdev: Return error for missing callbacks
When a callback does not exist, the Flashdev API should return error
where possible instead of success. When the API returns success for
missing callbacks, the Flashdev API client code may end up using
uninitialized variables as if they were filled by the API.

Closes #5391
2025-11-10 12:29:32 -06:00
Kinsey Moore
2179cd2fee cpukit/libdebugger: Address clobbered warnings
Move variable assignments after the setjmp() call where possible and
move macros that contain setjmp into an if() clause since assigning the
return value to a variable is undefined.

Updates #5364
2025-11-02 21:26:43 -06:00
Joel Sherrill
cfc9ee2e60 libdebugger/rtems-debugger-*.c: Address ignored qualifier warnings
GCC generates a warning when the return type of a function has a type
qualifier such as 'const'.
2025-10-17 15:08:47 -05:00
Joel Sherrill
f6c6b309eb cpukit/libmisc/shell/main_pci.c: Add field in shell_pci_modifier table
This file had a table supporting the command line options.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
100d62d1ec rtems-debugger-cmd.c: Address missing field initializer warnings (shell)
Address missing field initializer warnings.

These were rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
f519633d0d cpukit/.../shell: Address missing field initializer warnings
Address missing field initializer warnings.

These were all rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-14 14:23:59 -05:00
Chris Johns
6269686dfb rtemscxx: Support building on Unix
This lets you develop unittests on Unix.
2025-10-14 14:43:26 +11:00
Aaron Nyholm
62bbd05a31 cpukit/close.c: Open flag corrected for busy closes
Fix closing while busy. Previously open flag in the iop would be unset despite
close returning EBUSY.
Updates #5311
2025-10-14 13:09:51 +11:00
Gedare Bloom
523b97ed40 cpukit/rtems: regenerate basedefs with fallthrough
Regenerate basedefs from specifications with RTEMS_FALL_THROUGH().
2025-10-13 19:02:19 +00:00
Joel Sherrill
a4319861c0 cpukit i386: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:03:23 +00:00
Joel Sherrill
01cd6f74aa cpukit arm: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
34f9c5690d cpukit: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
a9a8c963e4 cpukit moxie: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00