While doing relicensing, I noticed that Yang Xi's submissions were
inconsistent about including a copyright. This adds that and does
some associated clean up. If comments were in the
attribution/license comment, they were converted to the Doxygen
comment block. No attribution or license changes were made.
I have reached out to Yang Xi for relicensing but not heard back
but the need for this cleanup was noticed.
Updates #3053
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was notpossible
to reset events after the return. But analysis determined that the
longjmp() should always returns to the same stack frame. Thus local
variables should be preserved. The warning was disabled.
This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.
Updates #5364.
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was possible
to set cpu_self after the return from setjmp().
This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.
Updates #5364.
In some cases a file read is not completed in a single call into the
JFFS2 layer and the inode is left in the READING state. When this
happens, it's possible for a garbage collection pass to be initiated
before completion of the read. In some such cases, the garbage
collection pass is executed in a tight loop that expects granular
locking to allow forward progress of the read between collection passes.
With RTEMS monolithic locking of the JFFS2 layer, forward progress is
not possible in this situation since the monolithic lock is never
released inside the loop.
The solution is to have the garbage collection pass return failure when
no progress is possible due to a bad inode state. This allows the read
to complete and the collection pass can be attempted at a later time.
This extends the flashdev API to support the additional calls required
by NAND device backends. This also adds region-relative IOCTLs to
prevent reimplementation of offset logic in top-end flashdev/filesystem
adapters.
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
libmisc/shell was in a previous patch.
The case did not have a break because it was calling a function
which should have been marked as "__dead". It was calling a
function which was marked "__dead". Apparently the analysis
did not see through the extra layer.
These files are included or compiled multiple times. Any warning
in these results in many warning instances. Found with GCC's warning
-Wunused-paramter.
Fixed many warnings for unused parameters. Some cases were
a simple matter of adding "(void) param" at the beginning
of the function, while others required ensuring that addition
was inside the proper conditional section. Found with GCC's
warning -Wunused-paramter.
The files impacted by this change are part of the RTEMS specific
port and do not need to be conditional on RTEMS. Found with GCC's
warning -Wunused-paramter.
This is a third party file and the debug macros create unused
parameter warnings when debugging is not enabled. There are
multiple macros with layers. Rather than attempt to unwind all
this, disabled the -Wunused-parameter GCC warning around the
short block of code causing these warnings.
The maximum size of JFFS2 is 4GB minus the block size of the flash.
Enforce this limitation when setting up a filesystem on a flashdev
region that is larger than the maximum.
This also resolves some off-nominal memory leaks.
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.
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>
This adds the Xilinx compatibility layer for use with various Xilinx
libraries. The first consumer of this will be lwIP support for the
Zynq7000 platform.