rename now actively changes the inode of the file being renamed.
This change has been done to fix an issue when the file being renamed is already opened before the rename, in particular failing to update the inode number (and the two lookup tables) could cause at least two problems:
1) A new file created in the same source folder of the file being renamed may get the same fat file descriptor of the renamed file
2) An open to the renamed file opens a new fat file descriptor, thus putting out of sync the operations on the file (two distinct fat file descriptor working on the same clusters and entries)
Previously the inode was in any case changed once the file was closed.
Another possible solution would have been to separate the inode number from the lookup table, but this solution would have required much more memory because it needed to keep track of all files seen in the file system up to the last operation and not only the opened ones.
Closes#5044
The patch adds the generation of a notification after an Asynchronous I/O
request has been completed. The notification is generated using the aio_sigevent
filed in the aiocb struct, as defined by the posix specifiations.
A new control, ensuring the validity of the field, is added on each call to
aio_read(), aio_write() and aio_fsync().
The patch also adds tests to cover the new code, and fixes formatting errors of
various aio files.
This adds an environment variable that can be used to enable or disable
window size retrieval for the RTEMS shell. This will also disable window
size retrieval upon failure while allowing the user to re-enable it.
On systems that don't provide a proper terminal or have broken window
size detection, the RTEMS shell can take a long time execute commands if
the kernel tick interval is longer than 1ms. This updates the shell
window size retrieval timeout code to account for the kernel tick
interval bringing the experienced timeout from 12.5ms to 1.25ms when
using the default kernel tick interval (10ms).
Import <sys/tree.h> from Newlib as <rtems/score/bsd-tree.h> using Newlib commit:
commit eb03ac17f16f1bd354482148426353fd35cd879d
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Tue Oct 5 15:53:47 2021 +0200
sys/tree.h: Red child with black sibling rotations
Add specialized rotations RB_RED_ROTATE_LEFT() and RB_RED_ROTATE_RIGHT() which
may be used if we rotate a red child which has a black sibling. Such a red
node must have at least two child nodes so that the following red-black tree
invariant is fulfilled:
Every path from a given node to any of its descendant NULL nodes goes through
the same number of black nodes.
PARENT
/ \
BLACK RED
/ \
BLACK BLACK
Close#5049.
From the Dhrystone RATIONALE:
o No procedure merging
Although Dhrystone contains some very short procedures where execution would
benefit from procedure merging (inlining, macro expansion of procedures),
procedure merging is not to be used. The reason is that the percentage of
procedure and function calls is part of the "Dhrystone distribution" of
statements contained in [1]. This restriction does not hold for the string
functions of the C version since ANSI C allows an implementation to use
inline code for these functions.
Close#5058.
Closes#5055
## Summary
add rtems_counting_semaphore_wait_timed_ticks and rtems_counting_semaphore_try_wait for self-contained object counting semaphore.
1. rtems_counting_semaphore_wait_timed_ticks(rtems_counting_semaphore \*counting_semaphore,uint32_t ticks)
2. rtems_counting_semaphore_try_wait(rtems_counting_semaphore \*counting_semaphore)
close issue #5055.
<!-- Default settings, if it is a dropdown it will set after submission -->
This switches the XQspiPsu NOR driver layer to use the RTEMS event
system so that waits for interrupt-based data transfers can time out
instead of waiting indefinitely. It is sometimes possible for either the
controller or the NOR chip to fail to issue a transfer completion event
and recovery is preferable to a hang.
Added field to the aio control block to track when a result is retrieved
and modified code accordingly.
Updated documentation for aio_return() and aio_error().
Updated test psxaio01 to make it compatible with specifications.
Closes#5039
Set/clear SCTLR[I] on all online processors. Do not enable/disable the
L2C-310 cache in the instruction cache enable/disable since it is a
unified cache.
On some targets or configurations, the data cache cannot be disabled.
The data cache may be necessary to provide atomic operations. In SMP
configurations, the data cache may be required to ensure data coherency.
Close#5050.