Commit Graph

13423 Commits

Author SHA1 Message Date
Joel Sherrill
86f00b3183 cpukit/include/.../*.h: Address unused parameter warnings
These files are included multiple times and any warning in these
results in many warning instances. Found with GCC's warning
-Wunused-paramter.
2025-09-25 14:41:34 -05:00
Kinsey Moore
19151f01ae cpukit/jffs2: Resolve errors with debug enabled 2025-09-24 13:20:46 -05:00
Chris Johns
f30157f988 libdebugger: Add SMP support for ARM
Make the aarch64 SMP support a separate file and share it between
aarch64 and arm.
2025-09-22 20:51:58 +00:00
Kinsey Moore
75e7f5cb80 cpukit/flashdev: Add unregister call and private data destructor
This adds an API call allowing for unregistration to include destruction
of private data that is not managed by the flashdev framework. This also
updates the existing consumers of flashdev to use the new private data
destructor callback.
2025-09-22 10:04:58 -05:00
Michal Lenc
e8de13e0c5 cpukit/dev/can/can-bittiming.c: remove calls to abs()
Using abs() on unsigned integers leads to GCC warning -Wabsolute-value.
This commit removes the calls to abs() and replaces them with ternary
conditional operator. This keeps the correct error calculation
previously ensured by abs() call.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-09-20 20:47:14 +02:00
Jeremy Lorelli
d8ba01ec52 cpukit: Raise internal error if we cannot open stdin with fileno 0
If someone manages to open a file before rtems_libio_post_driver is run,
open() may allocate a file number other than 0 for stdin. This leads to
a silent failure of the logic in rtems_libio_post_driver, and confusing
behavior because your BSP behaves as if it doesn't have a console.

Instead of failing silently, raise an internal error if open() succeeds
but gives us an unexpected file number for stdin.
2025-09-20 08:57:16 +10:00
Kinsey Moore
53c427773f cpukit/libfs/jffs2: Remove secondary stale version
The version referenced in the first sentence has become stale and
redundant. Remove it in favor of the version in the command below.
2025-09-20 08:10:08 +10:00
Joel Sherrill
106363b29d cpukit/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
38c0f48f53 cpukit/include/rtems/score/basedefs.h: Add RTEMS_FALL_THROUGH()
The RTEMS_FALL_THROUGH macro was needed to provide a portable
way to annotate that a case in a switch statement intentionally
does not have a break statement. It is known as "falling through"
and a common bug.

Adding this macro enabled addressing -Wimplicit-fallthrough warnings.
2025-09-19 19:02:25 +00:00
Joel Sherrill
78e050f603 cpukit/score/src/kern_ntptime.c: Negative Shift Value Warning
The code in question was shifting a signed integer. This was
caught by the -Wshift-negative-value GCC warning.

Closes #5339.
2025-09-18 17:48:06 -05:00
Gedare Bloom
948bbec7f6 shell: add noreturn attribute to err.h 2025-09-18 14:14:15 -06:00
Joel Sherrill
fd9f54ed23 pipe support: Update attribution email and relicense to 2-BSD
Wei Shen gave permission to relicense and asked to change the
email address to match that used on GitHub.

Updates #3053.
2025-09-18 09:26:39 -05:00
Christian Mauderer
1bb370b644 cpukit/jffs2: Fix unaligned writes
The code in flashio.c had a special case for handling unaligned buffers
during writes. That code did roughly the following:

If the size or start address of the buffer is not aligned to a word:
* align the size up to the next word
* create a temp buffer on heap or stack with the new size
* copy the data from write buffer to this temp buffer
* write the temp buffer with the _new_ size to the flash
* tell the code above, that the original size has been written

That means, that in certain cases, one to three random bytes have been
written to the flash. That is definitively not correct.

The special cases that trigger the behaviour seem to happen quite often
when using the RTEMS functions to unpack a .tar.gz with files in the
range of a few megabytes stored on the JFFS2 file system to the same
file system.

The RTEMS interface for flash drivers doesn't define any alignment
requirements. Therefore that code is not necessary and can just be
removed to solve these issues.
2025-09-17 15:12:27 +02:00
Joel Sherrill
ba3acfd3d0 misc: Fix empty body warnings
Address the small number of cases where an empty body occurred in
an if, else, or do while.
2025-09-15 16:25:37 +00:00
Joel Sherrill
76d37a714e libdebugger/rtems-debugger-arm.c: Fix using defined() in expansion
The definition of NEEDS_THUMB_SWITCH was not portable and flagged by
the GCC -Wexpansion-to-defined. It is not portable to expand a macro
which uses futher cpp directives.

Closes #5328.
2025-09-15 16:24:17 +00:00
Mazen Adel Elmessady
f929bcba5b cpukit/posix: Added pthread clock functions
Added pthread_cond_clockwait(), pthread_mutex_clocklock()
pthread_rwlock_clockrdlock() and pthread_rwlock_clockwrlock()
that are new in POSIX Issue 8. Also added tests.
The implementation used the timed versions of these functions
as a reference.

Updates
rtems/programs/gsoc#69
2025-09-10 19:56:50 +00:00
Kinsey Moore
509ce2fde4 cpukit/flashdev: Remove unnecessary reinitialization 2025-09-10 18:56:24 +00:00
Joel Sherrill
f2bbe99804 cpukit/.../m68k/qsm.h, sim.h: Update to Two Paragraph BSD
John Gwynne gave permission to relicense his submissions to
Two Paragraph BSD.

Updates #3053.
2025-09-09 16:13:02 +00:00
Aaron Nyholm
f93f3b87c8 flashdev: Added missing copyright 2025-09-09 16:09:49 +00:00
Joel Sherrill
eb6cbbf997 arm, rtl22xx: Relicense Ray Xy contributions to 2-BSD
Permission granted to relicense.

Updates #3053.
2025-09-08 12:25:34 -05:00
Mazen Adel Elmessady
c6606de311 cpukit/posix: Add clock support to thread queue timeouts
Added new functions to thread queue infrastructure to support
clock-specific timeout operations, making it easier to integrate
POSIX Issue 8 clock functions.

Updates
rtems/programs/gsoc#69
rtems#24
2025-09-06 16:16:12 +00:00
Kinsey Moore
b898aa6203 cpukit/flashdev: Correct page/sector references 2025-09-05 13:13:19 -05:00
Sunil Hegde
ac67445c84 cpukit/libgnat/ada_intrsupp.c: Fixed formatting
Fixed formatting based on suggestions by format diff.
2025-09-04 19:06:13 -05:00
Sunil Hegde
ccef4b74d0 cpukit/libgnat/ada_intrsupp.c: removed uses of set_vector()
removed uses of set_vector in __gnat_interrupt_connect()
and __gnat_interrupt_set()

Updates #5215
2025-09-04 19:06:13 -05:00
Bhavya Shah
4646d614c3 cpukit/libfs/imfs: Fix the maximum file size calculation
Fixes #5319
2025-09-04 18:26:46 -05:00
Martin Erik Werner
b19d1c49ed cpukit: Correct region documentation notes
Update the rtems_region_get_information() and
rtems_region_get_information() documentation with various more or less
minor wording fixes:

* "obtain a diagnostic information." ->
  "obtain diagnostic information."

* "This method forms am O(n)" ->
  "This directive performs an O(n)"

* "scan of the free in the region" ->
  "scan of the free blocks in the region"

* "many used blocks and a much smaller number of used blocks" ->
  "many used blocks and a much smaller number of free blocks"

These changes were generated from rtems-central.
2025-09-04 15:46:44 +00:00
Joel Sherrill
017ec9440e cpukit/libmisc/regulator/regulator.c: Fix order of calloc() arguments
Address calls to calloc () which swap the number of elements and
size of each element argument.
2025-09-04 15:43:45 +00:00
Joel Sherrill
65cac69a1c cpukit/libblock/src/bdbuf.c: Fix order of calloc() arguments
Address calls to calloc () which swap the number of elements and
size of each element argument.
2025-09-04 15:43:45 +00:00
Joel Sherrill
a162a5cdcf cpukit/include/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Sebastian Huber
79ca48adcc rtems: Use single '`' for code phrases
These files are generated from specification items.  Use Markdown
format.
2025-09-02 16:54:57 +00:00
Sebastian Huber
33e3b09c16 rtems: Use '-' instead of '*' for Doxygen lists
These files are generated from specification items.  The Markdown
formatting tool used for the documentation sources requires the use
of '-' for lists instead of '*'.
2025-09-02 16:54:57 +00:00
Sebastian Huber
d07bf743a3 rtems: Add missing copyright
Add copyright for rtems_barrier_get_number_waiting().
2025-09-02 16:54:57 +00:00
Sebastian Huber
f691b48e4d appl-config: Replace reST role
Doxygen does not understand the :term: role.
2025-09-02 16:54:57 +00:00
Kinsey Moore
94251a25fb cpukit: Remove telnetd
The telnet server library is being moved from the primary RTEMS
repository to the rtems-net-services repository.

Updates #5290
2025-08-26 14:42:42 -04:00
Joel Sherrill
51a2ee5e33 cpukit/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Martin Erik Werner
cf388ecb03 cpukit: Reword chain get wait routine->directive
Based on discord comment from Sebastian Huber suggesting that directive
would be appropriate terminology for referring to an "RTEMS API
function".
2025-08-21 13:06:07 -05:00
Martin Erik Werner
cec22d9b66 cpukit: Correct rtems_chain_get_with_wait() doc.
The Doxygen documentation for rtems_chain_get_with_wait() appears to be
incorrect based on a copy-paste from rtems_chain_get_with_notification().

Correct the documentation to describe the get and wait mechanism.
2025-08-21 13:06:07 -05:00
Sebastian Huber
6477324b4c rtems: Fix Doxygen comments
Use matching parameter names.
2025-08-21 17:16:10 +00:00
Sebastian Huber
8fd021bbb3 m68k: Do not assign to a linker symbol
The _VBR is a symbol defined by linker scripts.  You cannot change this
value at runtime.  The BSP initialization has to ensure that
m68k_set_vbr() is only set to _VBR.

Close #5210.
2025-08-14 07:02:01 +02:00
Lucian Silistru
45b1495a8a record: Avoid dependency on object link order
For the application configuration option
CONFIGURE_RECORD_INTERRUPTS_ENABLED, define
bsp_interrupt_get_dispatch_table_slot() in the application configuration
to avoid issues with the object link order within the RTEMS libraries.

Enable this option in an associated test.

Close #5244.
2025-08-12 13:18:30 -05:00
Joel Sherrill
3470ea15f1 cpukit/include: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
c87131e192 cpukit/libcsupport: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
f33e7c9a0c cpukit/libdl: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
1d23476eb1 cpukit/libfs: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
ea86780bdf cpukit/libmisc: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
be89bf6be0 cpukit/libtrace: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
9d81cacf25 cpukit/sapi: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
7df3c45159 cpukit/posix: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
26aa9106af cpukit/rtems: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
e2d61770d9 cpukit/score: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00