Compare commits

...

58 Commits

Author SHA1 Message Date
Kinsey Moore
23accdc0bb 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 #5392
2025-11-10 12:36:33 -06:00
Kinsey Moore
2c8973005d bsps/shared/xqspi_flash.c: Add support for sector information
Updates #5392
2025-11-10 12:35:56 -06:00
Aaron Nyholm
e82e11ff4a testsuites/fstests/fsclose01: Fix expected flags
close() now holds a reference to the IOP this changes the
expected flags in the test. This change reflects that.
Updates #5311
2025-11-05 19:50:18 +00:00
Aaron Nyholm
6b86b9fd13 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-11-05 19:50:18 +00:00
Aaron Nyholm
482746182f bsps/shared/jffs2_flashdev.c: Fixed fatal heap error on failed mount
Removed double free of mount_data and instance.
Closes #5382
2025-10-28 15:16:41 +11:00
Kinsey Moore
665b09e692 bsps/jffs2_flashdev: Return correct value for OOB size
Return the actual out of bounds size per page instead of the ioctl
return status. JFFS2 will happily operate with an OOB size of 0 and
instead put cleanmarkers in the normal page space of the flash.

Closes #5379
2025-10-23 15:34:51 -05:00
Kinsey Moore
36a3845d9c bsps/qspi: Make flashdev control structure private
These structures are not required to be exposed to users for any
functionality and users of the API have no way to make use of them.

Closes #5375
2025-10-16 11:31:23 -05:00
Aaron Nyholm
f4328001c7 cpukit/close.c: Fix reference counting under concurrent access.
Fixes issue with IOP being freed during close call.
Updates #5311
2025-10-10 09:40:59 +11:00
Jeremy Lorelli
074cb8f337 libchip/ds1375: Refactor to use i2c-rtc driver
Previously this RTC was using the file system-based i2c interface in
/dev. Since the RTC is initialized pretty early on during system init,
we call open() before stdin/stdout/stderr have been opened. RTEMS
assumes that stdin == 0, stdout == 1, etc., and fails when that isn't
the case. In particular, when stdin != 0, RTEMS assumes that it wasn't
configured with a console driver and skips opening stdout/stderr,
leading to confusing issues with the standard I/O streams.

Closes #5284
2025-10-09 17:19:04 -05:00
Jeremy Lorelli
7d44e6de7e 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.

Updates #5284
2025-10-09 17:18:44 -05:00
Kinsey Moore
cdcc886ddc bsps/dev/spi/xqspipsu_flash_config.h: Make flash config table static
This is now used by multiple files and can cause a multiple definitions
error when linking. Make the structure static to avoid this problem.

Closes #5372
2025-10-08 15:36:23 -05:00
Kinsey Moore
b19119212d spec/bsps/aarch64/xilinx-zynqmp: Add XQspiPsu flashdev backend
Closes #5371
2025-10-08 16:45:28 +00:00
Kinsey Moore
32e76ed96d bsps/shared/dev/flash/jffs2: Add support for NAND
This adds support for NAND to the JFFS2 flashdev adapter.

Closes #5369
2025-10-08 16:44:11 +00:00
Matteo Concas
10154a6eca bsps/noelv: Align instruction in bsp_reset()
Closes #5368
2025-10-03 11:40:45 +02:00
Kinsey Moore
df40ffa9dc cpukit/jffs2/gc.c: Prevent live lock for split reads
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.

Closes #5365
2025-10-02 19:15:09 -05:00
Kinsey Moore
1c3cd25ebd cpukit/flashdev: Add full support for NAND devices
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.

Closes #5350
2025-10-02 20:13:29 -04:00
Sebastian Huber
f42ad92071 validation: Move storage class qualifier
Backport storage class qualifier rearrangment required by more recent C
language standard revisions.

Close #5337.
2025-10-03 09:45:31 +10:00
Chris Johns
d45d353abb libdebugger: Add SMP support for ARM
Make the aarch64 SMP support a separate file and share it between
aarch64 and arm.

Closes #5348
2025-09-25 07:29:52 -05:00
Kinsey Moore
b05ae8a6d4 bsps/shared/dev/flash: Enforce maximum JFFS2 filesystem size
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.

Closes #5347
2025-09-22 20:48:39 -05:00
Kinsey Moore
d0190f0718 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.

Closes #5346
2025-09-22 19:00:36 -05:00
mez3n
a79d702be6 rtems: Add rtems_barrier_get_number_waiting()
Backport commit 528095cd24.

Close #5336.
2025-09-20 08:06:16 +10:00
Sebastian Huber
d27c444b8d rtems: Backport Doxygen changes
The conversion to Markdown for the documentation sources resulted in
changes of Doxygen comments of generated sources. Backport these
changes.

Close #5338.
2025-09-12 04:43:04 +02:00
Kinsey Moore
a79813c96e cpukit/libdebugger/server: Use generic TLS accessor
This updates the libdebugger server to use a generic TLS area access
mechanism so that it works across all supported architectures.

Closes #5313
2025-07-31 11:10:56 +10:00
Chris Johns
0cf6de01df cpukit/libio: Support close with IOP references held
- Provide an option for a file system to support close wtih
  references held. This can happen in more complex file systems
  and file descriptor handling with more complete reference
  handling implementations where an fd can hold other fds and
  close can be call on any fd and succeed.

- Fix open IOP leaks in the error paths.

- Provide better definition of the IOP flags to help clarify
  the code.

Fixes #5201
Closes #5311
2025-07-26 21:23:36 -05:00
Kinsey Moore
1240e8f81b cpukit/libdebugger: Add support for TLS variables
This adds support for the "vGetTLSAddr" GDB query which retrieves the
address of a TLS variable by offset from the beginning of the TLS memory
space for the given thread. This offset does not include the size of the
thread control block which is at the beginning of every TLS area as used
by RTEMS. Notably, the returned address is big-endian rather than the
little-endian typical with other responses.

This functionality does not include retrieval of addresses for TLS
variables hosted in loadable modules, only TLS variables in the host
binary.

Closes #5271
2025-07-24 20:31:40 -05:00
Kinsey Moore
b1dbd9eeae bsps/dev/spi/xqspipsu-flash-helper: Explain source
This adds a missing header block and better explains the provenance of
the xqspipsu-flash-helper files and their copyright status.

Closes #5309
2025-07-23 15:18:13 -05:00
Kinsey Moore
84d4c11c30 bsps/include/dev/spi: Add missing extern and guard
This adds missing extern "C" declarations and a missing header guard.

Updates #5309
2025-07-23 15:17:59 -05:00
Matteo Concas
e7fa90ab0c cpu/riscv: Add Smdbltrp extension compatibility
If the Double Trap Extension is implemented, the
MDT bit of the mstatus (or mstatush in RV32)
register will be set when a trap is to be taken.

The MIE (Machine Interrupt Enable) bit can only
be set to 1 if the MDT bit is zero.

Thus, we need to clear MDT first if we want to
enable interrupts when dispatching a thread.

MDT is also cleared in register a1 before
restoring the interrupt frame as writing 1 to MDT
will cause MIE to be set to 0. In RV64 this
happens regardless of the value written to MIE in
the same write.

In RV32, MDT is in the mstatush so we do not need
to clear during restore as this register is not
restored.

With this change all 60 SMP tests pass (compared
to 20/60 before the fix). The tests have been run
on hardware using two RV64 CPUs that implement
the double trap extension.

Close #5288

(cherry picked from commit 19f12d2dca)
2025-07-03 10:07:39 +02:00
Matteo Concas
dd490c5c2d bsps/noelv: Fix using console in polled mode
Before, the console driver needed
`BSP_CONSOLE_USE_INTERRUPTS` to be defined or it
would not build. The intent was to use polled
mode if the macro was equal to zero.

This change makes it so interrupt mode is used if
the macro is defined and polled mode is used if
the macro is not defined.

(cherry picked from commit 5e0a68d3ab)

Close #5283
2025-06-27 09:41:33 +02:00
Matteo Concas
d010f6ae8b bsps/sparc/leon3: Fix GPTIMER timer index logic
The old logic would lead to an error when
multiprocessing was enabled and
`LEON3_GPTIMER_BASE` was defined due to
`leon3_timer_core_index` being undefined.

The new logic fixes this and keeps the same
intent:
 - If multiprocessing is not enabled, the timer
   index is 0
 - If multiprocessing is enabled and
   `LEON3_GPTIMER_BASE` is defined, the timer
   index is twice the CPU boot index
 - If multiprocessing is enabled and
   `LEON3_GPTIMER_BASE` is not defined, we
   fallback to the old logic using the GPTIMER
   core index.

Close #5281
2025-06-25 08:22:13 +02:00
Kinsey Moore
3d8b56f10c cpukit/libdebugger: Prevent hang on memory access
When memory is accessed by the remote debugging client, the access is
sandboxed with setjmp/longjmp and appropriate exception handlers to
prevent the attempted access from causing a failure of the debugger or
otherwise altering execution. The existing implementation works as
expected when the context executing the memory access and the exception
context resulting from a failed access do not share a stack.

In the case of AArch64, a failed access when the debugger is already in
exception context causes a re-entry into exception context where the
machine state is pushed onto the same stack that was in use where the
exception occurred. When setjmp is called inside a stack frame and the
exception occurs outside that stack frame, the stack frame is unwound
before the exception occurs and the exception entry overwrites the area
previously occupied by the stack frame housing the setjmp and corrupting
the link register that is stored there. After restoration of state using
longjmp(), this corrupted link register information is loaded from the
stack frame and undesired behavior occurs.

In the instance of this bug that was encountered, the corrupted link
register contained an unaligned pointer which caused an unending cascade
of prefetch abort exceptions presenting as a hard hang.

Closes #5273
2025-06-18 13:53:35 -05:00
Chris Johns
cb3fba0447 bsps/shared/dev/ide: Initalise ATA request links as off chain
- Fixes the asserts when building with RTEMS_DEBUG

Closes #5254
2025-05-28 13:01:00 +10:00
Chris Johns
6335d7e48a machine/timecounters: Add missing _Timecounter_ decls
Add:

 - _Timecounter_Getboottime
 - _Timecounter_Getboottimebin

Closes #5212
2025-05-09 08:37:01 +10:00
Chris Johns
f769b20c98 cpukit/libdl: Fix loading symbols from an object file at runtime
- Assume a relocation record with a symbol name with a length of
  0 is resolved. ARM seems to create a symbol with no name for
  R_ARM_V4BX relocation records.

- Move the addition of the rtems_rtl_base_sym_global_add symbol
  to the global symbol table to the weak
  rtems_rtl_base_global_syms_init call. If symbols are
  embedded the support for runtime loading symbols is over
  loaded. This change is required so the base object has a
  valid global symbol table attached to track dependencies.

Fixes #5234
2025-04-01 12:31:32 +11:00
Matteo Concas
9dae9f5fe8 spec: Install missing header files for GRLIB and SPARC
The following files will be installed during SPARC/GRLIB builds:
- bsps/include/grlib/apbuart-regs.h
- bsps/include/grlib/gptimer-regs.h
- bsps/include/grlib/irqamp-regs.h
- bsps/sparc/include/grlib/io.h

Closes issue #5232
2025-03-26 17:43:13 +01:00
Amar Takhar
b4149b2282 gitlab: Add link to CI
This runs only the commit message and merge request checker.

Required so we can have 'all pipelines must pass' enabled due to a bug in
Gitlab
2025-02-12 22:22:24 -05:00
Chris Johns
87bf49b715 Revert "build: Provide LDFLAGS for pkg-config"
This reverts commit e36ba91110
2025-02-11 05:38:19 +00:00
Sebastian Huber
e421c922a8 bsp/qoriq: Ignore spurious interrupts
For example, with edge triggered external interrupts we may see spurious
interrupts.   Ignore them instead of issuing a fatal error.

Use eieio to synchronize access to the IACK and EOI registers.

Use a loop to immediately services the next pending interrupt without
having to go through the exception epiloge and prologue.

Close #5173.
2025-02-07 16:18:23 -07:00
Sebastian Huber
e36ba91110 build: Provide LDFLAGS for pkg-config
Some pkg-config variants perform transformations on the --libs options.
This may lead to completely broken linker options.  Provide the LDFLAGS
as a variable.  Remove "Ldflags:" since this is an unsupported field.

Update #5165.
2025-02-07 18:28:01 +00:00
Jan Sommer
a0e4be53f4 grlib/occan: Fix baud rate calculation
Fixes #5205
2025-02-07 08:50:42 -07:00
Jan Sommer
9641e1e97d cpukit/termios: Fix ordering of baud rate table
rtems_termios_set_best_baud expects a sorted baud rate table.

Fixes #5202
2025-02-03 12:04:33 -07:00
Reinking, Janosch
f1c201c508 bsps/shared: NS16550 driver updates the line control register during operation
Fixes: #5179
2025-01-24 00:08:29 +00:00
Zhaoyue Wang
603c168a0b cpukit/libmisc: fix flag in capture.c
The RTEMS_CAPTURE_OVERFLOW is an overflow flag for each CPU, and its
value is the same as RTEMS_CAPTURE_INIT. Executing rtems_capture_flush
will set the RTEMS_CAPTURE_INIT flag to 0 in the global flags.

Fixes #5184.
2025-01-23 23:45:01 +00:00
Ranulfo Raphael
84c2cf3da9 cpukit/libdl/arm: Fix trampoline alignment
This commit aligns trampolines for THUMB and ARM instructions
(CALL/JUMP24 and THM_JUMP24/THM_PC22).

According to the ARM technical reference in section "Register-relative
and PC-relative expressions":
    In Thumb code:
    - For B, BL, CBNZ, and CBZ instructions, the value of the PC is the
      address of the current instruction plus 4 bytes.
    - For all other instructions that use labels, the value of the PC is
      the address of the current instruction plus 4 bytes, with bit[1]
      of the result cleared to 0 to make it word-aligned.

Closes #5189
2025-01-23 19:38:05 -03:00
Chris Johns
0a46769ba4 waf: Handle no version label in VERSION when a release
Closes #5185
2025-01-22 13:55:03 +11:00
Kinsey Moore
f7de6d5425 spec/pkgconfig: Account for separate compilation and linking
When compilation and linking are performed separately, some platforms
(i.e. RISC-V) may require that ABI flags are provided during the linking
step as well as the compilation step.

Closes #5183
2025-01-16 19:02:56 -06:00
Sebastian Huber
34ba74f4f4 score: Fix RTEMS_DEBUG build
Close #5159.
2025-01-08 06:41:12 +01:00
Chris Johns
d61a739e41 waf: Update to waf-2.1.4
Closes #5167
2024-12-22 10:42:40 +11:00
Sebastian Huber
a357119bd6 build: Improve Makefile.inc
Support relocated BSP installations by letting the user provide
RTEMS_ROOT.

Close #5171.
2024-12-05 04:11:45 +01:00
Sebastian Huber
e79dc64c8e rtems: Remove pre-qualified constraints
The pre-qualified constraints are not applicable to mainline RTEMS.
2024-11-27 04:47:26 +01:00
Sebastian Huber
7f00921b07 score: Support scheduler change inhibitors
For example, the POSIX sporadic server adds a second priority to a
thread.  We cannot account for this priority in a scheduler change.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
63c5d062c3 score: Fix _Thread_Priority_change()
The POSIX sporadic server may temporarily remove the real priority of a
thread.  Check that the priority node is active before the change is
propagated.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
65e480312c posix: Use real priority for sporadic server state
This allows to other areas to use the real priority node state.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
78e5e76572 psxtests/psx09: Change prio while at low prio
Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
5eb938283d psxtests/psx09: Improve sporadic server tests
Drop thread parameter from get_current_prio().

Lock/unlock ceiling mutex while executing at low and high priority.

Update #5164.
2024-11-27 02:17:14 +00:00
Sebastian Huber
e565dbba65 psxtests/psx09: Use local variables
Update #5164.
2024-11-27 02:17:14 +00:00
Kinsey Moore
106d00537e posix/lio_listio: corrected addition of system event
Previously the system event used by lio_listio was manually added to
event.h and not using rtems-central. This patch corrects that and renames
the event to make it clearer.

Some related dead code has also been removed.


(cherry picked from commit cabc8c3a78)

Co-authored-by: alessandronardin <ale.daluch@gmail.com>
2024-11-26 19:42:12 +00:00
Chris Johns
c529694656 cpukit/jffs2/rtime: Fix off-by-one error in decompression check
Closes #5072


(cherry picked from commit abaea2b798)

Co-authored-by: Kinsey Moore <kinsey.moore@oarcorp.com>
2024-11-22 02:22:32 +00:00
147 changed files with 3894 additions and 2532 deletions

4
.gitlab/gitlab-ci.yml Normal file
View File

@@ -0,0 +1,4 @@
include:
- project: 'administration/integration'
file:
- 'ci/config/rtems.yml'

View File

@@ -30,6 +30,15 @@
#include <stdlib.h>
#include <string.h>
/*
* @brief Struct allocating memory space for flash regions. Used by
* rtems_flashdev to store region allocations.
*/
typedef struct zqspi_flash_region_table {
rtems_flashdev_region zqspi_flash_regions[ZQSPI_FLASH_MAX_REGIONS];
uint32_t zqspi_flash_bit_allocator;
} zqspi_flash_region_table;
static uint32_t zqspi_get_jedec_id(rtems_flashdev *flash) {
uint32_t jedec = 0;
zqspi_readid(flash->driver, &jedec);
@@ -147,6 +156,12 @@ static int zqspi_sector_count(
return 0;
}
static void zqspi_priv_destroy(rtems_flashdev* flash)
{
free(flash->region_table->regions);
free(flash->region_table);
}
rtems_flashdev* zqspi_flashdev_init(zqspiflash *bmdriver)
{
zqspi_flash_region_table *xtable =
@@ -178,6 +193,7 @@ rtems_flashdev* zqspi_flashdev_init(zqspiflash *bmdriver)
}
flash->driver = bmdriver;
flash->priv_destroy = &zqspi_priv_destroy;
flash->read = &zqspi_read_wrapper;
flash->write = &zqspi_write_wrapper;
flash->erase = &zqspi_erase_wrapper;
@@ -193,10 +209,3 @@ rtems_flashdev* zqspi_flashdev_init(zqspiflash *bmdriver)
return flash;
}
void zqspi_flashdev_destroy(rtems_flashdev* flash)
{
free(flash->region_table->regions);
free(flash->region_table);
rtems_flashdev_destroy_and_free(flash);
}

View File

@@ -32,10 +32,11 @@
#define ZQSPI_FLASH_MAX_REGIONS ((size_t)32)
/*
* @brief Initializes a flash device using zynq qspi flash
* driver. The flash device is not registered in this call.
* If an rtems_flashdev is created using zqspi_flash_init it must be
* destroyed using xqspi_flash_destroy.
* @brief Initializes a flash device using zynq qspi flash driver.
*
* The flash device is not registered in this call. If an rtems_flashdev is
* created using zqspi_flash_init and is not registered, it must be destroyed
* using rtems_flashdev_destroy.
*
* @param[in] zqspiflash A initialised zqspiflash device to wrap.
*
@@ -44,23 +45,4 @@
*/
rtems_flashdev* zqspi_flashdev_init(zqspiflash *bmdriver);
/*
* @brief Destroys a rtems_flashdev initialised with zqspi_flash_init.
* If an rtems_flashdev is created using zqspi_flash_init it must be
* destroyed using zqspi_flash_destroy. The zqspiflash originally passed in
* is untouched.
*
* @param[in] flash The flashdev to destroy
*/
void zqspi_flashdev_destroy(rtems_flashdev* flash);
/*
* @brief Struct allocating memory space for flash regions. Used by
* rtems_flashdev to store region allocations.
*/
typedef struct zqspi_flash_region_table {
rtems_flashdev_region zqspi_flash_regions[ZQSPI_FLASH_MAX_REGIONS];
uint32_t zqspi_flash_bit_allocator;
} zqspi_flash_region_table;
#endif /* _ZYNQ_QSPI_FLASHDEV_H */

View File

@@ -30,6 +30,10 @@
#include <bsp/utility.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint32_t config;
#define CADENCE_SPI_CONFIG_MODEFAIL_EN BSP_BIT32(17)
@@ -82,4 +86,8 @@ typedef struct {
uint32_t moduleid;
} cadence_spi;
#ifdef __cplusplus
}
#endif
#endif /* LIBBSP_ARM_XILINX_ZYNQ_CADENCE_SPI_REGS_H */

View File

@@ -30,6 +30,10 @@
#include <bsp/utility.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint32_t reserved1[7];
uint32_t globalirq;
@@ -85,4 +89,8 @@ typedef struct {
uint32_t rx_fifo_len;
} xilinx_axi_spi;
#ifdef __cplusplus
}
#endif
#endif /* LIBBSP_ARM_XILINX_AXI_SPI_REGS_H */

View File

@@ -31,13 +31,17 @@
#include <dev/flash/flashdev.h>
#include <dev/spi/xqspipsu.h>
#ifdef __cplusplus
extern "C" {
#endif
#define XQSPI_FLASH_MAX_REGIONS ((size_t)32)
/*
* @brief Initializes a flash device using Xilinx's xqspi flash
* driver. The flash device is not registered in this call.
* If an rtems_flashdev is created using xqspi_flash_init it must be
* destroyed using xqspi_flash_destroy.
* @brief Initializes a flash device using Xilinx's xqspi flash driver.
*
* The flash device is not registered in this call. The returned object must be
* destroyed with rtems_flashdev_destroy_and_free if it has not been registered.
*
* @param[in] xQspiDev A configured XQspiPsu device to initialise.
*
@@ -46,23 +50,8 @@
*/
rtems_flashdev* xqspi_flash_init(XQspiPsu *xQspiDev);
/*
* @brief Destroys a rtems_flashdev initialised with xqspi_flash_init.
* If an rtems_flashdev is created using xqspi_flash_init it must be
* destroyed using xqspi_flash_destroy. The XQspiPsu originally passed in
* is untouched.
*
* @param[in] flash The flashdev to destroy
*/
void xqspi_flash_destroy(rtems_flashdev* flash);
/*
* @brief Struct allocating memory space for flash regions. Used by
* rtems_flashdev to store region allocations.
*/
typedef struct xqspi_flash_region_table {
rtems_flashdev_region xqspi_flash_regions[XQSPI_FLASH_MAX_REGIONS];
uint32_t xqspi_flash_bit_allocator;
} xqspi_flash_region_table;
#ifdef __cplusplus
}
#endif
#endif /* XILINX_XQSPI_FLASH_H */

View File

@@ -3,8 +3,27 @@
* SPDX-License-Identifier: MIT
******************************************************************************/
/**
* @file xqspipsu_flash_helper.h
*
* This file contains flash helper function prototypes for the QSPIPSU driver.
* It consists of modified functions from Xilinx's flash example in
* examples/xqspipsu_generic_flash_interrupt_example.c of the qspipsu driver.
*
* Since the comment blocks and general form of the functions has not changed,
* the Xilinx copyright above is maintained, but this file is not part of the
* upstream embeddedsw distribution.
*/
#ifndef LIBBSP_DEV_SPI_XQSPIPSU_HELPER_H
#define LIBBSP_DEV_SPI_XQSPIPSU_HELPER_H
#include "xqspipsu.h"
#ifdef __cplusplus
extern "C" {
#endif
int QspiPsu_NOR_Initialize(
XQspiPsu *QspiPsuInstancePtr,
u16 QspiPsuIntrId
@@ -231,3 +250,9 @@ u32 QspiPsu_NOR_Get_Page_Size(XQspiPsu *QspiPsuPtr);
* @return The JEDEC ID of attached flash in bytes.
******************************************************************************/
u32 QspiPsu_NOR_Get_JEDEC_ID(XQspiPsu *QspiPsuPtr);
#ifdef __cplusplus
}
#endif
#endif /* LIBBSP_DEV_SPI_XQSPIPSU_HELPER_H */

View File

@@ -215,6 +215,9 @@ typedef struct{
} FlashInfo;
/************************** Variable Definitions *****************************/
#ifdef __rtems__
static
#endif
FlashInfo Flash_Config_Table[] = {
/* Spansion */
/*s25fl064l*/

View File

@@ -52,45 +52,34 @@
#include <rtems.h>
#include <libchip/rtc.h>
#include <stdint.h>
#include <libchip/i2c-rtc.h>
#ifdef __cplusplus
extern "C" {
#endif
extern rtc_fns rtc_ds1375_fns;
bool
rtc_ds1375_device_probe( int minor );
uint32_t
rtc_ds1375_get_register( uintptr_t port, uint8_t reg );
void
rtc_ds1375_set_register( uintptr_t port, uint8_t reg, uint32_t value );
int
rtc_ds1375_hw_init(struct i2c_rtc_base *base);
/*
* BSP must supply string constant argument 'i2cname' which matches
* the registered device name of the raw i2c device (created with mknod).
* E.g., "/dev/i2c.ds1375-raw"
*
* NOTE: The i2c bus driver must already be up and 'i2cname' already
* be available when this ENTRY is registered or initialized.
*
* If you want to allow applications to add the RTC driver to
* the configuration table then the i2c subsystem must be
* initialized by the BSP from the predriver_hook.
* BSP must supply the ds1375_rtc_ctx argument, which is i2c_rtc_base*
* Use with the DS1375_RTC_INITIALIZER macro:
* struct i2c_rtc_base ctx = DS1375_RTC_INITIALIZER("/dev/i2c0", 0x68);
* ...
* DS1375_RTC_TBL_ENTRY("/dev/rtc", &ctx)
*/
#define DS1375_RTC_TBL_ENTRY(i2cname) \
{ \
sDeviceName: "/dev/rtc", \
deviceType: RTC_CUSTOM, \
pDeviceFns: &rtc_ds1375_fns, \
deviceProbe: rtc_ds1375_device_probe, \
ulCtrlPort1: (uintptr_t)(i2cname), \
ulDataPort: 0, \
getRegister: rtc_ds1375_get_register, \
setRegister: rtc_ds1375_set_register, \
}
#define DS1375_RTC_TBL_ENTRY(dev_name, ds1375_rtc_ctx) \
I2C_RTC_TBL_ENTRY(dev_name, ds1375_rtc_ctx)
#define DS1375_RTC_INITIALIZER(i2c_path, i2c_address) \
I2C_RTC_INITIALIZER( \
i2c_path, \
i2c_address, \
0, \
I2C_RTC_ORDER_sec_min_hour_wkday_day_month_year, \
"ds1375", \
rtc_ds1375_hw_init)
#ifdef __cplusplus
}

View File

@@ -11,10 +11,13 @@
#include <bsp.h>
#include <libchip/rtc.h>
#include <libchip/ds1375-rtc.h>
#include <rtems/rtems/sem.h>
static struct i2c_rtc_base ds1375_ctx = DS1375_RTC_INITIALIZER("/dev/i2c0", 0x68);
/* The following table configures the RTC drivers used in this BSP */
rtc_tbl RTC_Table[] = {
DS1375_RTC_TBL_ENTRY(BSP_I2C_DS1375_RAW_DEV_NAME),
DS1375_RTC_TBL_ENTRY("/dev/rtc", &ds1375_ctx),
};
/* Some information used by the RTC driver */

View File

@@ -9,7 +9,7 @@
*/
/*
* Copyright (C) 2010, 2017 embedded brains GmbH & Co. KG
* Copyright (C) 2010, 2024 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -162,8 +162,6 @@ rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
void bsp_interrupt_dispatch(uintptr_t exception_number)
{
unsigned int vector;
if (exception_number == 10) {
qoriq_decrementer_dispatch();
return;
@@ -176,22 +174,25 @@ void bsp_interrupt_dispatch(uintptr_t exception_number)
}
#endif
/*
* This works only if the "has-external-proxy" property is present in the
* "epapr,hv-pic" device tree node.
*/
PPC_SPECIAL_PURPOSE_REGISTER(FSL_EIS_EPR, vector);
if (vector != SPURIOUS) {
while (true) {
unsigned int vector;
uint32_t msr;
/*
* This works only if the "has-external-proxy" property is present in the
* "epapr,hv-pic" device tree node.
*/
PPC_SPECIAL_PURPOSE_REGISTER(FSL_EIS_EPR, vector);
if (vector == SPURIOUS) {
return;
}
msr = ppc_external_exceptions_enable();
bsp_interrupt_handler_dispatch(vector);
ppc_external_exceptions_disable(msr);
ev_int_eoi(vector);
} else {
bsp_interrupt_handler_default(vector);
}
}
@@ -586,19 +587,20 @@ rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
void bsp_interrupt_dispatch(uintptr_t exception_number)
{
rtems_vector_number vector = qoriq.pic.iack;
while (true) {
rtems_vector_number vector = qoriq.pic.iack;
uint32_t msr;
if (vector != SPURIOUS) {
uint32_t msr = ppc_external_exceptions_enable();
if (vector == SPURIOUS) {
return;
}
msr = ppc_external_exceptions_enable();
bsp_interrupt_handler_dispatch(vector);
ppc_external_exceptions_disable(msr);
qoriq.pic.eoi = 0;
qoriq.pic.whoami;
} else {
bsp_interrupt_handler_default(vector);
ppc_enforce_in_order_execution_of_io();
}
}

View File

@@ -181,11 +181,14 @@ rtems_status_code console_initialize(
rtems_termios_initialize();
const rtems_termios_device_handler *handler = &apbuart_handler_polled;
const rtems_termios_device_handler *handler;
if (BSP_CONSOLE_USE_INTERRUPTS) {
#ifdef BSP_CONSOLE_USE_INTERRUPTS
handler = &apbuart_handler_interrupt;
}
#else
handler = &apbuart_handler_polled;
#endif
for (size_t i = 0; i < apbuart_devices; ++i) {
struct apbuart_context *ctx;

View File

@@ -38,7 +38,7 @@ void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
uint64_t args[2] = {ADP_Stopped_ApplicationExit, code};
__asm__ volatile ("li a0, %0" ::"i"(TARGET_SYS_EXIT_EXTENDED));
__asm__ volatile ("mv a1, %0" ::"r"(&args));
__asm__ volatile ("slli zero, zero, 0x1f");
__asm__ volatile (".align 4; slli zero, zero, 0x1f");
__asm__ volatile ("ebreak");
__asm__ volatile ("srai zero, zero, 0x7");
RTEMS_UNREACHABLE();

View File

@@ -112,6 +112,86 @@ static int do_erase(
return 0;
}
static int do_block_is_bad(
rtems_jffs2_flash_control *super,
uint32_t offset,
bool *bad
)
{
int status;
int fd = fileno(get_flash_control( super )->handle);
rtems_flashdev_ioctl_sector_health args;
args.location = offset;
status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_SECTOR_HEALTH, &args);
*bad = args.sector_bad;
return status;
}
static int do_block_mark_bad(
rtems_jffs2_flash_control *super,
uint32_t offset
)
{
int fd = fileno(get_flash_control( super )->handle);
off_t o_offset = offset;
return ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_SECTOR_MARK_BAD, &o_offset);
}
static int do_read_oob(
rtems_jffs2_flash_control *super,
uint32_t offset,
uint8_t *oobbuf,
uint32_t ooblen
)
{
int fd = fileno(get_flash_control( super )->handle);
rtems_flashdev_ioctl_oob_rw_info args;
args.offset = offset;
args.count = ooblen;
args.buffer = oobbuf;
return ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_OOB_READ, &args);
}
static int do_write_oob(
rtems_jffs2_flash_control *super,
uint32_t offset,
uint8_t *oobbuf,
uint32_t ooblen
)
{
int fd = fileno(get_flash_control( super )->handle);
rtems_flashdev_ioctl_oob_rw_info args;
args.offset = offset;
args.count = ooblen;
args.buffer = oobbuf;
return ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_OOB_WRITE, &args);
}
static uint32_t do_get_oob_size(
rtems_jffs2_flash_control *super
)
{
int rv;
int fd = fileno(get_flash_control( super )->handle);
size_t bytes_per_page = 0;
rv = ioctl(fd, RTEMS_FLASHDEV_IOCTL_OOB_BYTES_PER_PAGE, &bytes_per_page);
if (rv != 0) {
return 0;
}
return bytes_per_page;
}
static void do_destroy( rtems_jffs2_flash_control *super )
{
flash_control *self = get_flash_control( super );
@@ -125,7 +205,7 @@ static int get_sector_size(int fd, uint32_t *size)
rtems_flashdev_ioctl_sector_info sec_info = {0, };
int status;
status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_SECTORINFO_BY_OFFSET, &sec_info);
status = ioctl(fd, RTEMS_FLASHDEV_IOCTL_REGION_SECTORINFO_BY_OFFSET, &sec_info);
if (status == 0) {
*size = sec_info.sector_info.size;
}
@@ -175,6 +255,10 @@ rtems_status_code jffs2_flashdev_mount(
rtems_jffs2_mount_data *mount_data;
flash_control *instance;
rtems_flashdev_flash_type flash_type;
uint64_t jedec_id = 0;
uint64_t max_jffs2_size = 0x100000000LU;
uint32_t block_size = 0;
uint32_t write_size = 0;
file = fopen(flashdev_path, read_only ? "r" : "r+");
if (file == NULL) {
@@ -188,6 +272,38 @@ rtems_status_code jffs2_flashdev_mount(
return RTEMS_NOT_IMPLEMENTED;
}
/* Get JEDEC ID, device_identifier is a 64bit dev_t */
status = get_jedec_id(fd, &jedec_id);
if ( status != 0 ) {
return status;
}
/* Retrieve page size as sector/block size */
status = get_sector_size(fd, &block_size);
if ( status != 0 ) {
return status;
}
/* JFFS2 maximum FS size is one block less than 4GB */
max_jffs2_size -= block_size;
/* Enforce maximum JFFS2 filesystem size */
if (region->size > max_jffs2_size) {
return RTEMS_INVALID_SIZE;
}
status = get_flash_type(fd, &flash_type);
if ( status != 0 ) {
return status;
}
if (flash_type == RTEMS_FLASHDEV_NAND) {
status = get_page_size(fd, &write_size);
if ( status != 0 ) {
return status;
}
}
mount_data = malloc(sizeof(*mount_data));
if (mount_data == NULL) {
fclose(file);
@@ -212,36 +328,23 @@ rtems_status_code jffs2_flashdev_mount(
instance->super.write = do_write;
instance->super.erase = do_erase;
instance->super.destroy = do_destroy;
/* Get JEDEC ID, device_identifier is a 64bit dev_t */
status = get_jedec_id(fd, &instance->super.device_identifier);
if ( status != 0 ) {
return status;
}
instance->super.device_identifier = jedec_id;
instance->super.block_size = block_size;
/* Set flash size from region size */
instance->super.flash_size = region->size;
/* Retrieve page size as sector/block size */
status = get_sector_size(fd, &instance->super.block_size);
if ( status != 0 ) {
return status;
}
status = get_flash_type(fd, &flash_type);
if ( status != 0 ) {
return status;
}
/*
* Write size should only be provided to JFFS2 for NAND flash since JFFS2 uses
* a write size of 0 to indicate non-NAND flash to disable write buffers.
*/
if (flash_type == RTEMS_FLASHDEV_NAND) {
status = get_page_size(fd, &instance->super.write_size);
if ( status != 0 ) {
return status;
}
instance->super.write_size = write_size;
instance->super.block_is_bad = do_block_is_bad;
instance->super.block_mark_bad = do_block_mark_bad;
instance->super.oob_read = do_read_oob;
instance->super.oob_write = do_write_oob;
instance->super.get_oob_size = do_get_oob_size;
}
status = mount(

View File

@@ -225,6 +225,7 @@ ata_io_data_request(ata_ide_dev_t *ata_dev, rtems_blkdev_request *req)
areq->breq->bufnum * (areq->breq->bufs[0].length / ATA_SECTOR_SIZE);
/* add request to the queue of awaiting requests to the controller */
rtems_chain_set_off_chain(&areq->link);
ata_add_to_controller_queue(ctrl_minor, areq);
return RTEMS_SUCCESSFUL;
@@ -1249,6 +1250,7 @@ rtems_ata_initialize(rtems_device_major_number major,
rtems_message_queue_delete(ata_queue_id);
return status;
}
rtems_chain_set_off_chain(&int_st->link);
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
rtems_chain_append(
&ata_int_vec[IDE_Controller_Table[ctrl_minor].int_vec],

View File

@@ -46,7 +46,9 @@
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
*/
/* This driver uses the file-system interface to the i2c bus */
/**
* Modified to use i2c-rtc driver by J. Lorelli <lorelli@slac.stanford.edu>
*/
#include <unistd.h> /* write, read, close */
@@ -59,45 +61,7 @@
#include <libchip/ds1375-rtc.h>
#include <sys/fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#define STATIC static
#undef DEBUG
/* The RTC driver routines are possibly called during
* system initialization -- that would be prior to opening
* the console. At this point it is not safe to use stdio
* (printf, perror etc.).
* Our file descriptors may even be 0..2
*/
#define STDIOSAFE(fmt,args...) \
do { \
if ( _System_state_Is_up( _System_state_Get() ) ) { \
fprintf(stderr,fmt,args); \
} else { \
printk(fmt,args); \
} \
} while (0)
STATIC uint8_t ds1375_bcd2bin(uint8_t x)
{
uint8_t h = x & 0xf0;
/* 8*hi + 2*hi + lo */
return ( h >> 1 ) + ( h >> 3 ) + ( x & 0xf );
}
STATIC uint8_t ds1375_bin2bcd(uint8_t x)
{
uint8_t h = x/10;
return ( h << 4 ) + ( x - ( ( h << 3 ) + ( h << 1 ) ) );
}
#include <stdint.h>
/*
* Register Definitions and Access Macros
@@ -107,47 +71,6 @@ STATIC uint8_t ds1375_bin2bcd(uint8_t x)
* starting at the seconds (for the 1375 both,
* _REG and _OFF happen to be identical).
*/
#define DS1375_SEC_REG 0x0
#define DS1375_SEC_OFF (DS1375_SEC_REG-DS1375_SEC_REG)
/* Extract seconds and convert to binary */
#define DS1375_SEC(x) ds1375_bcd2bin( ((x)[DS1375_SEC_OFF]) & 0x7f )
#define DS1375_MIN_REG 0x1
#define DS1375_MIN_OFF (DS1375_MIN_REG-DS1375_SEC_REG)
/* Extract minutes and convert to binary */
#define DS1375_MIN(x) ds1375_bcd2bin( ((x)[DS1375_MIN_OFF]) & 0x7f )
#define DS1375_HR_REG 0x2
#define DS1375_HR_OFF (DS1375_HR_REG-DS1375_SEC_REG)
#define DS1375_HR_1224 (1<<6)
#define DS1375_HR_AMPM (1<<5)
/* Are hours in AM/PM representation ? */
#define DS1375_IS_AMPM(x) (DS1375_HR_1224 & ((x)[DS1375_HR_OFF]))
/* Are we PM ? */
#define DS1375_IS_PM(x) (DS1375_HR_AMPM & ((x)[DS1375_HR_OFF]))
/* Extract hours (12h mode) and convert to binary */
#define DS1375_HR_12(x) ds1375_bcd2bin( ((x)[DS1375_HR_OFF]) & 0x1f )
/* Extract hours (24h mode) and convert to binary */
#define DS1375_HR_24(x) ds1375_bcd2bin( ((x)[DS1375_HR_OFF]) & 0x3f )
#define DS1375_DAY_REG 0x3
#define DS1375_DAY_OFF (DS1375_DAY_REG-DS1375_SEC_REG)
#define DS1375_DAT_REG 0x4
#define DS1375_DAT_OFF (DS1375_DAT_REG-DS1375_SEC_REG)
/* Extract date and convert to binary */
#define DS1375_DAT(x) ds1375_bcd2bin( ((x)[DS1375_DAT_OFF]) & 0x3f )
#define DS1375_MON_REG 0x5
#define DS1375_MON_OFF (DS1375_MON_REG-DS1375_SEC_REG)
#define DS1375_MON_CTRY (1<<7)
/* Is century bit set ? */
#define DS1375_IS_CTRY(x) (((x)[DS1375_MON_OFF]) & DS1375_MON_CTRY)
/* Extract month and convert to binary */
#define DS1375_MON(x) ds1375_bcd2bin( ((x)[DS1375_MON_OFF]) & 0x1f )
#define DS1375_YR_REG 0x6
#define DS1375_YR_OFF (DS1375_YR_REG-DS1375_SEC_REG)
/* Extract year and convert to binary */
#define DS1375_YR(x) ds1375_bcd2bin( ((x)[DS1375_YR_OFF]) & 0xff )
/* CR Register and bit definitions */
#define DS1375_CR_REG 0xe
@@ -162,301 +85,21 @@ STATIC uint8_t ds1375_bin2bcd(uint8_t x)
#define DS1375_CSR_REG 0xf
/* User SRAM (8 bytes) */
#define DS1375_RAM 0x10 /* start of 8 bytes user ram */
/* Access Primitives */
STATIC int rd_bytes(
int fd,
uint32_t off,
uint8_t *buf,
int len
)
{
uint8_t ptr = off;
return 1 == write( fd, &ptr, 1 ) && len == read( fd, buf, len ) ? 0 : -1;
}
STATIC int wr_bytes(
int fd,
uint32_t off,
uint8_t *buf,
int len
)
{
uint8_t d[ len + 1 ];
/* Must not break up writing of the register pointer and
* the data to-be-written into multiple write() calls
* because every 'write()' operation sends START and
* the chip interprets the first byte after START as
* the register pointer.
*/
d[0] = off;
memcpy( d + 1, buf, len );
return len + 1 == write( fd, d, len + 1 ) ? 0 : -1;
}
/* Helpers */
static int getfd(
int minor
)
{
return open( (const char *)RTC_Table[minor].ulCtrlPort1, O_RDWR );
}
/* Driver Access Functions */
STATIC void ds1375_initialize(
int minor
)
{
int fd;
uint8_t cr;
if ( ( fd = getfd( minor ) ) >= 0 ) {
if ( 0 == rd_bytes( fd, DS1375_CR_REG, &cr, 1 ) ) {
/* make sure clock is enabled */
if ( ! ( DS1375_CR_ECLK & cr ) ) {
cr |= DS1375_CR_ECLK;
wr_bytes( fd, DS1375_CR_REG, &cr, 1 );
}
}
close( fd );
}
}
STATIC int ds1375_get_time(
int minor,
rtems_time_of_day *time
)
{
int rval = -1;
int fd;
uint8_t buf[DS1375_YR_REG + 1 - DS1375_SEC_REG];
if ( time && ( ( fd = getfd( minor ) ) >= 0 ) ) {
if ( 0 == rd_bytes( fd, DS1375_SEC_REG, buf, sizeof(buf) ) ) {
time->year = DS1375_IS_CTRY( buf ) ? 2000 : 1900;
time->year += DS1375_YR ( buf );
time->month = DS1375_MON( buf );
time->day = DS1375_DAT( buf ); /* DAY is weekday */
if ( DS1375_IS_AMPM( buf ) ) {
time->hour = DS1375_HR_12 ( buf );
if ( DS1375_IS_PM( buf ) )
time->hour += 12;
} else {
time->hour = DS1375_HR_24 ( buf );
}
time->minute = DS1375_MIN( buf );
time->second = DS1375_SEC( buf );
time->ticks = 0;
rval = 0;
}
close( fd );
}
return rval;
}
STATIC int ds1375_set_time(
int minor,
const rtems_time_of_day *time
)
{
int rval = -1;
int fd = -1;
time_t secs;
struct tm tm;
uint8_t buf[DS1375_YR_REG + 1 - DS1375_SEC_REG];
uint8_t cr = 0xff;
/*
* The clock hardware maintains the day-of-week as a separate counter
* so we must compute it ourselves (rtems_time_of_day doesn't come
* with a day of week).
*/
secs = _TOD_To_seconds( time );
/* we're only interested in tm_wday... */
gmtime_r( &secs, &tm );
buf[DS1375_SEC_OFF] = ds1375_bin2bcd( time->second );
buf[DS1375_MIN_OFF] = ds1375_bin2bcd( time->minute );
/* bin2bcd(hour) implicitly selects 24h mode since ms-bit is clear */
buf[DS1375_HR_OFF] = ds1375_bin2bcd( time->hour );
buf[DS1375_DAY_OFF] = tm.tm_wday + 1;
buf[DS1375_DAT_OFF] = ds1375_bin2bcd( time->day );
buf[DS1375_MON_OFF] = ds1375_bin2bcd( time->month );
if ( time->year >= 2000 ) {
buf[DS1375_YR_OFF] = ds1375_bin2bcd( time->year - 2000 );
buf[DS1375_MON_OFF] |= DS1375_MON_CTRY;
} else {
buf[DS1375_YR_OFF] = ds1375_bin2bcd( time->year - 1900 );
}
/*
* Stop clock; update registers and restart. This is slightly
* slower than just writing everyting but if we did that we
* could get inconsistent registers if this routine would not
* complete in less than 1s (says the datasheet) and we don't
* know if we are going to be pre-empted for some time...
*/
if ( ( fd = getfd( minor ) ) < 0 ) {
goto cleanup;
}
if ( rd_bytes( fd, DS1375_CR_REG, &cr, 1 ) )
goto cleanup;
cr &= ~DS1375_CR_ECLK;
/* This stops the clock */
if ( wr_bytes( fd, DS1375_CR_REG, &cr, 1 ) )
goto cleanup;
/* write new contents */
if ( wr_bytes( fd, DS1375_SEC_REG, buf, sizeof(buf) ) )
goto cleanup;
rval = 0;
cleanup:
if ( fd >= 0 ) {
if ( ! ( DS1375_CR_ECLK & cr ) ) {
/* start clock; this handles some cases of failure
* after stopping the clock by restarting it again
*/
cr |= DS1375_CR_ECLK;
if ( wr_bytes( fd, DS1375_CR_REG, &cr, 1 ) )
rval = -1;
}
close( fd );
}
return rval;
}
/* Debugging / Testing */
#ifdef DEBUG
/* Don't forget to set "TZ" when using these test routines */
/* What is rtems_time_of_day good for ? Why not use std types ? */
uint32_t
ds1375_get_time_tst()
{
rtems_time_of_day rtod;
time_t secs;
ds1375_get_time( 0, &rtod );
secs = _TOD_To_seconds( &rtod );
printf( "%s\n", ctime( &secs ) );
return secs;
}
/* Initialize the hardware */
int
ds1375_set_time_tst( const char *datstr, rtems_time_of_day *prt )
rtc_ds1375_hw_init(struct i2c_rtc_base *base)
{
struct tm tm;
time_t secs;
rtems_time_of_day rt;
if ( !datstr )
return -1;
if ( ! strptime( datstr, "%Y-%m-%d/%T", &tm ) )
return -2;
if ( ! prt )
prt = &rt;
secs = mktime( &tm );
/* convert to UTC */
gmtime_r( &secs, &tm );
printf("Y: %"PRIu32" ", (prt->year = tm.tm_year + 1900) );
printf("M: %"PRIu32" ", (prt->month = tm.tm_mon + 1) );
printf("D: %"PRIu32" ", (prt->day = tm.tm_mday ) );
printf("h: %"PRIu32" ", (prt->hour = tm.tm_hour ) );
printf("m: %"PRIu32" ", (prt->minute = tm.tm_min ) );
printf("s: %"PRIu32"\n", (prt->second = tm.tm_sec ) );
prt->ticks = 0;
return ( prt == &rt ) ? ds1375_set_time( 0, &rt ) : 0;
uint8_t cr;
int r = i2c_rtc_read(base, DS1375_CR_REG, &cr, 1);
if (r != 0)
return r;
/* make sure clock is enabled */
if (!(cr & DS1375_CR_ECLK)) {
cr |= DS1375_CR_ECLK;
r = i2c_rtc_write(base, DS1375_CR_REG, &cr, 1);
if (r != 0)
return r;
}
return 0;
}
#endif
uint32_t
rtc_ds1375_get_register( uintptr_t port, uint8_t reg )
{
int fd;
uint8_t v;
uint32_t rval = -1;
if ( ( fd = open( (const char*)port, O_RDWR ) ) >= 0 ) {
if ( 0 == rd_bytes( fd, reg, &v, 1 ) ) {
rval = v;
}
close( fd );
}
return rval;
}
void
rtc_ds1375_set_register( uintptr_t port, uint8_t reg, uint32_t value )
{
int fd;
uint8_t v = value;
if ( ( fd = open( (const char*)port, O_RDWR ) ) >= 0 ) {
wr_bytes( fd, reg, &v, 1 );
close( fd );
}
}
bool rtc_ds1375_device_probe(
int minor
)
{
int fd;
if ( ( fd = getfd( minor ) ) < 0 ) {
STDIOSAFE( "ds1375_probe (open): %s\n", strerror( errno ) );
return false;
}
/* Try to set file pointer */
if ( 0 != wr_bytes( fd, DS1375_SEC_REG, 0, 0 ) ) {
STDIOSAFE( "ds1375_probe (wr_bytes): %s\n", strerror( errno ) );
close( fd );
return false;
}
if ( close( fd ) ) {
STDIOSAFE( "ds1375_probe (close): %s\n", strerror( errno ) );
return false;
}
return true;
}
rtc_fns rtc_ds1375_fns = {
.deviceInitialize = ds1375_initialize,
.deviceGetTime = ds1375_get_time,
.deviceSetTime = ds1375_set_time,
};

View File

@@ -590,7 +590,7 @@ int ns16550_set_attributes(
* turn into the LSB and MSB divisor latch registers.
*/
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB);
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB | ucLineControl);
(*setReg)(pNS16550, NS16550_TRANSMIT_BUFFER, ulBaudDivisor&0xff);
(*setReg)(pNS16550, NS16550_INTERRUPT_ENABLE, (ulBaudDivisor>>8)&0xff);

View File

@@ -32,6 +32,15 @@
#include <stdlib.h>
#include <string.h>
/*
* @brief Struct allocating memory space for flash regions. Used by
* rtems_flashdev to store region allocations.
*/
typedef struct xqspi_flash_region_table {
rtems_flashdev_region xqspi_flash_regions[XQSPI_FLASH_MAX_REGIONS];
uint32_t xqspi_flash_bit_allocator;
} xqspi_flash_region_table;
static uint32_t xqspi_get_jedec_id(rtems_flashdev *flash) {
return QspiPsu_NOR_Get_JEDEC_ID(flash->driver);
}
@@ -90,6 +99,28 @@ static int xqspi_page_count(
return 0;
}
static int xqspi_sector_count(
rtems_flashdev *flash,
int *sector_count
)
{
*sector_count = QspiPsu_NOR_Get_Device_Size(flash->driver) /
QspiPsu_NOR_Get_Sector_Size(flash->driver);
return 0;
}
static int xqspi_sector_info_by_off(
rtems_flashdev *flash,
off_t search_offset,
off_t *sector_offset,
size_t *sector_size
)
{
*sector_size = QspiPsu_NOR_Get_Sector_Size(flash->driver);
*sector_offset = search_offset - (search_offset%((off_t)(*sector_size)));
return 0;
}
static int xqspi_write_block_size(
rtems_flashdev *flash,
size_t *write_block_size
@@ -121,6 +152,12 @@ static int xqspi_erase_wrapper(
return QspiPsu_NOR_Erase(flash_driver, (uint32_t)offset, (uint32_t)count);
}
static void xqspi_flash_priv_destroy(rtems_flashdev* flash)
{
free(flash->region_table->regions);
free(flash->region_table);
}
rtems_flashdev* xqspi_flash_init(XQspiPsu *xQspiDev)
{
xqspi_flash_region_table *xtable =
@@ -152,6 +189,7 @@ rtems_flashdev* xqspi_flash_init(XQspiPsu *xQspiDev)
}
flash->driver = xQspiDev;
flash->priv_destroy = &xqspi_flash_priv_destroy;
flash->read = &xqspi_read_wrapper;
flash->write = &xqspi_write_wrapper;
flash->erase = &xqspi_erase_wrapper;
@@ -161,14 +199,9 @@ rtems_flashdev* xqspi_flash_init(XQspiPsu *xQspiDev)
flash->page_info_by_index = &xqspi_page_info_by_index;
flash->page_count = &xqspi_page_count;
flash->write_block_size = &xqspi_write_block_size;
flash->sector_count = &xqspi_sector_count;
flash->sector_info_by_offset = &xqspi_sector_info_by_off;
flash->region_table = ftable;
return flash;
}
void xqspi_flash_destroy(rtems_flashdev* flash)
{
free(flash->region_table->regions);
free(flash->region_table);
rtems_flashdev_destroy_and_free(flash);
}

View File

@@ -10,6 +10,9 @@
* consists of modified functions from Xilinx's flash example in
* examples/xqspipsu_generic_flash_interrupt_example.c of the qspipsu driver.
*
* Since the comment blocks and general form of the functions has not changed,
* the Xilinx copyright above is maintained, but this file is not part of the
* upstream embeddedsw distribution.
*/
#include "xqspipsu_flash_config.h"

View File

@@ -62,7 +62,8 @@ int grlib_canbtrs_calc_timing(
tseg++) {
/* calculate scaler */
tmp = ((br->divfactor + tseg) * baud);
sc = (core_hz * 2)/ tmp - core_hz / tmp;
/* Core frequency is always divided by 2 before scaler */
sc = core_hz / (2 * tmp);
if (sc <= 0 || sc > br->max_scaler)
continue;
if (br->has_bpr &&
@@ -71,7 +72,7 @@ int grlib_canbtrs_calc_timing(
((sc > 256 * 4) && (sc <= 256 * 8) && (sc & 0x7))))
continue;
error = baud - core_hz / (sc * (br->divfactor + tseg));
error = baud - core_hz / (2 * sc * (br->divfactor + tseg));
#ifdef GRLIB_CANBTRS_DEBUG
printf(" baud=%d, tseg=%d, sc=%d, error=%d\n",
baud, tseg, sc, error);

View File

@@ -1019,7 +1019,9 @@ static void convert_timing_to_btrs(
{
btrs->btr0 = (t->rsj << OCCAN_BUSTIM_SJW_BIT) |
(t->scaler & OCCAN_BUSTIM_BRP);
btrs->btr1 = (0<<7) | (t->ps2 << OCCAN_BUSTIM_TSEG2_BIT) | t->ps1;
/* Core adds +1 to the register values, so compensate here by decrementing */
btrs->btr1 = (0<<7) | ((t->ps2-1) << OCCAN_BUSTIM_TSEG2_BIT) | (t->ps1-1);
}
static int occan_set_speedregs(occan_priv *priv, occan_speed_regs *timing)

View File

@@ -21,14 +21,6 @@
#include <leon.h>
#include <rtems/btimer.h>
#if defined(RTEMS_MULTIPROCESSING)
#define LEON3_TIMER_INDEX \
((rtems_configuration_get_user_multiprocessing_table()) ? \
(rtems_configuration_get_user_multiprocessing_table()->node) - 1 : 1)
#else
#define LEON3_TIMER_INDEX 0
#endif
bool benchmark_timer_find_average_overhead;
bool benchmark_timer_is_initialized = false;
@@ -39,7 +31,7 @@ void benchmark_timer_initialize(void)
* Timer runs long and accurate enough not to require an interrupt.
*/
if (LEON3_Timer_Regs) {
gptimer_timer *timer = &LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX];
gptimer_timer *timer = &LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX];
if ( benchmark_timer_is_initialized == false ) {
/* approximately 1 us per countdown */
grlib_store_32( &timer->trldval, 0xffffff );
@@ -61,7 +53,7 @@ benchmark_timer_t benchmark_timer_read(void)
if (LEON3_Timer_Regs) {
total =
grlib_load_32( &LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].tcntval );
grlib_load_32( &LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].tcntval );
total = 0xffffff - total;

View File

@@ -216,11 +216,12 @@ extern unsigned int leon3_timer_prescaler;
* @brief This constant defines the index of the GPTIMER timer used by the
* clock driver.
*/
#if defined(RTEMS_MULTIPROCESSING)
#define LEON3_CLOCK_INDEX \
( leon3_timer_core_index != 0 ? 0 : 2 * LEON3_Cpu_Index )
#else
#if !defined(RTEMS_MULTIPROCESSING)
#define LEON3_CLOCK_INDEX 0
#elif defined(LEON3_GPTIMER_BASE)
#define LEON3_CLOCK_INDEX ( 2 * LEON3_Cpu_Index )
#else
#define LEON3_CLOCK_INDEX ( leon3_timer_core_index != 0 ? 0 : 2 * LEON3_Cpu_Index )
#endif
/**

View File

@@ -34,6 +34,7 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -103,7 +104,7 @@ static uint32_t rtems_flashdev_ioctl_jedec_id(
rtems_flashdev *flash
);
static uint32_t rtems_flashdev_ioctl_flash_type(
static int rtems_flashdev_ioctl_flash_type(
rtems_flashdev *flash,
void *arg
);
@@ -123,6 +124,11 @@ static int rtems_flashdev_ioctl_page_count(
void *arg
);
static int rtems_flashdev_ioctl_write_block_size(
rtems_flashdev *flash,
void *arg
);
static int rtems_flashdev_ioctl_sectorinfo_offset(
rtems_flashdev *flash,
void *arg
@@ -133,8 +139,38 @@ static int rtems_flashdev_ioctl_sector_count(
void *arg
);
static int rtems_flashdev_ioctl_write_block_size(
static int rtems_flashdev_ioctl_region_sectorinfo_offset(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
);
static int rtems_flashdev_ioctl_oob_bytes_per_page(
rtems_flashdev *flash,
void *arg
);
static int rtems_flashdev_ioctl_region_sector_mark_bad(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
);
static int rtems_flashdev_ioctl_region_sectorhealth(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
);
static int rtems_flashdev_ioctl_region_oob_read(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
);
static int rtems_flashdev_ioctl_region_oob_write(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
);
@@ -152,6 +188,12 @@ static int rtems_flashdev_get_abs_addr(
off_t *addr
);
static int rtems_flashdev_get_region_addr(
rtems_flashdev *flash,
rtems_libio_t *iop,
off_t *addr
);
static int rtems_flashdev_update_and_return(
rtems_libio_t *iop,
int status,
@@ -397,14 +439,32 @@ static int rtems_flashdev_ioctl(
case RTEMS_FLASHDEV_IOCTL_PAGE_COUNT:
err = rtems_flashdev_ioctl_page_count( flash, arg );
break;
case RTEMS_FLASHDEV_IOCTL_WRITE_BLOCK_SIZE:
err = rtems_flashdev_ioctl_write_block_size( flash, arg );
break;
case RTEMS_FLASHDEV_IOCTL_SECTORINFO_BY_OFFSET:
err = rtems_flashdev_ioctl_sectorinfo_offset( flash, arg );
break;
case RTEMS_FLASHDEV_IOCTL_SECTOR_COUNT:
err = rtems_flashdev_ioctl_sector_count( flash, arg );
break;
case RTEMS_FLASHDEV_IOCTL_WRITE_BLOCK_SIZE:
err = rtems_flashdev_ioctl_write_block_size( flash, arg );
case RTEMS_FLASHDEV_IOCTL_REGION_SECTORINFO_BY_OFFSET:
err = rtems_flashdev_ioctl_region_sectorinfo_offset( flash, iop, arg );
break;
case RTEMS_FLASHDEV_IOCTL_OOB_BYTES_PER_PAGE:
err = rtems_flashdev_ioctl_oob_bytes_per_page( flash, arg );
break;
case RTEMS_FLASHDEV_IOCTL_REGION_OOB_READ:
err = rtems_flashdev_ioctl_region_oob_read( flash, iop, arg );
break;
case RTEMS_FLASHDEV_IOCTL_REGION_OOB_WRITE:
err = rtems_flashdev_ioctl_region_oob_write( flash, iop, arg );
break;
case RTEMS_FLASHDEV_IOCTL_REGION_SECTOR_MARK_BAD:
err = rtems_flashdev_ioctl_region_sector_mark_bad( flash, iop, arg );
break;
case RTEMS_FLASHDEV_IOCTL_REGION_SECTOR_HEALTH:
err = rtems_flashdev_ioctl_region_sectorhealth( flash, iop, arg );
break;
default:
err = EINVAL;
@@ -501,6 +561,13 @@ int rtems_flashdev_register(
return rv;
}
int rtems_flashdev_unregister(
const char *flash_path
)
{
return unlink(flash_path);
}
static int rtems_flashdev_do_init(
rtems_flashdev *flash,
void ( *destroy )( rtems_flashdev *flash )
@@ -523,25 +590,38 @@ static int rtems_flashdev_do_init(
void rtems_flashdev_destroy( rtems_flashdev *flash )
{
rtems_recursive_mutex_destroy( &flash->mutex );
( *flash->destroy )( flash );
}
void rtems_flashdev_destroy_and_free( rtems_flashdev *flash )
{
rtems_flashdev_destroy( flash );
}
static void flashdev_destroy_internal( rtems_flashdev *flash )
{
if (flash->priv_destroy != NULL) {
( *flash->priv_destroy )( flash );
}
rtems_recursive_mutex_destroy( &flash->mutex );
}
static void flashdev_destroy_and_free_internal( rtems_flashdev *flash )
{
if ( flash == NULL ) {
return;
}
rtems_recursive_mutex_destroy( &( flash->mutex ) );
flashdev_destroy_internal( flash );
free( flash );
flash = NULL;
return;
}
int rtems_flashdev_init( rtems_flashdev *flash )
{
memset( flash, 0, sizeof( *flash ) );
return rtems_flashdev_do_init( flash, rtems_flashdev_destroy );
return rtems_flashdev_do_init( flash, flashdev_destroy_internal );
}
rtems_flashdev *rtems_flashdev_alloc_and_init( size_t size )
@@ -553,7 +633,7 @@ rtems_flashdev *rtems_flashdev_alloc_and_init( size_t size )
if ( flash != NULL ) {
int rv;
rv = rtems_flashdev_do_init( flash, rtems_flashdev_destroy_and_free );
rv = rtems_flashdev_do_init( flash, flashdev_destroy_and_free_internal );
if ( rv != 0 ) {
rtems_recursive_mutex_destroy( &flash->mutex );
free( flash );
@@ -612,6 +692,21 @@ static int rtems_flashdev_get_abs_addr(
}
return 0;
}
static int rtems_flashdev_get_region_addr(
rtems_flashdev *flash,
rtems_libio_t *iop,
off_t *addr
)
{
/* Get address for operation */
if ( rtems_flashdev_is_region_defined( iop ) ) {
*addr -= rtems_flashdev_get_region_offset( flash, iop );
return 0;
}
return -1;
}
static int rtems_flashdev_update_and_return(
rtems_libio_t *iop,
int status,
@@ -639,7 +734,7 @@ static int rtems_flashdev_ioctl_erase(
int status;
if ( flash->erase == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
}
erase_args_1 = (rtems_flashdev_region *) arg;
@@ -795,14 +890,14 @@ static uint32_t rtems_flashdev_ioctl_jedec_id( rtems_flashdev *flash )
}
}
static uint32_t rtems_flashdev_ioctl_flash_type(
static int rtems_flashdev_ioctl_flash_type(
rtems_flashdev *flash,
void *arg
)
{
rtems_flashdev_flash_type *type = (rtems_flashdev_flash_type*)arg;
if ( flash->flash_type == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
return ( *flash->flash_type )( flash, type );
}
@@ -819,7 +914,7 @@ static int rtems_flashdev_ioctl_pageinfo_offset(
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->page_info_by_offset == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
page_info = (rtems_flashdev_ioctl_page_info *) arg;
return ( *flash->page_info_by_offset )( flash,
@@ -838,7 +933,7 @@ static int rtems_flashdev_ioctl_pageinfo_index( rtems_flashdev *flash,
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->page_info_by_index == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
page_info = (rtems_flashdev_ioctl_page_info *) arg;
return ( *flash->page_info_by_index )( flash,
@@ -854,12 +949,27 @@ static int rtems_flashdev_ioctl_page_count( rtems_flashdev *flash, void *arg )
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->page_count == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
return ( *flash->page_count )( flash, ( (int *) arg ) );
}
}
static int rtems_flashdev_ioctl_write_block_size(
rtems_flashdev *flash,
void *arg
)
{
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->write_block_size == NULL ) {
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
return ( *flash->write_block_size )( flash, ( (size_t *) arg ) );
}
}
static int rtems_flashdev_ioctl_sectorinfo_offset(
rtems_flashdev *flash,
void *arg
@@ -871,7 +981,7 @@ static int rtems_flashdev_ioctl_sectorinfo_offset(
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->sector_info_by_offset == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
sector_info = (rtems_flashdev_ioctl_sector_info *) arg;
return ( *flash->sector_info_by_offset )( flash,
@@ -887,13 +997,200 @@ static int rtems_flashdev_ioctl_sector_count( rtems_flashdev *flash, void *arg )
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->sector_count == NULL ) {
return 0;
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
return ( *flash->sector_count )( flash, ( (int *) arg ) );
}
}
static int rtems_flashdev_ioctl_write_block_size(
static int rtems_flashdev_ioctl_region_sectorinfo_offset(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
)
{
int status;
rtems_flashdev_ioctl_sector_info *sector_info = arg;
off_t original_location;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
original_location = sector_info->location;
if (rtems_flashdev_get_abs_addr(flash, iop, 0, &sector_info->location) != 0) {
return -1;
}
status = rtems_flashdev_ioctl_sectorinfo_offset(flash, arg);
/* restore region-relative location */
sector_info->location = original_location;
if (status != 0) {
return status;
}
/* translate offset to region relative */
if (rtems_flashdev_get_region_addr(
flash, iop, &sector_info->sector_info.offset) != 0) {
return -1;
}
return 0;
}
static int rtems_flashdev_ioctl_oob_bytes_per_page(
rtems_flashdev *flash, void *arg
)
{
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->oob_bytes_per_page == NULL ) {
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
return ( *flash->oob_bytes_per_page )( flash, ( (size_t *) arg ) );
}
}
static int rtems_flashdev_ioctl_oob_read( rtems_flashdev *flash, void *arg )
{
rtems_flashdev_ioctl_oob_rw_info *rw_info;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->oob_read == NULL ) {
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
rw_info = (rtems_flashdev_ioctl_oob_rw_info *) arg;
return ( *flash->oob_read )(
flash, rw_info->offset, rw_info->count, rw_info->buffer
);
}
}
static int get_region_first_page_index(
rtems_flashdev *flash,
rtems_libio_t *iop,
off_t *region_page_index
)
{
off_t region_start = rtems_flashdev_get_region_offset( flash, iop );
size_t region_page_size = 0;
int status = 0;
off_t unused = 0;
/* get page size for region which should be consistent across NAND devices */
if (flash->page_info_by_offset == NULL) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
status = ( *flash->page_info_by_offset )(
flash,
region_start,
&unused,
&region_page_size
);
if (status != 0) {
rtems_set_errno_and_return_minus_one( status );
}
*region_page_index = region_start / region_page_size;
return 0;
}
static int rtems_flashdev_get_region_oob_addr(
rtems_flashdev *flash,
rtems_libio_t *iop,
off_t *offset
)
{
int status = 0;
size_t oob_bytes_per_page = 0;
off_t region_page_index;
/* get oob bytes per page which should be consistent across NAND devices */
if (flash->oob_bytes_per_page == NULL) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
status = ( *flash->oob_bytes_per_page )( flash, &oob_bytes_per_page );
if (status != 0) {
rtems_set_errno_and_return_minus_one( status );
}
/* get index of first page in region */
status = get_region_first_page_index(flash, iop, &region_page_index);
if (status != 0) {
rtems_set_errno_and_return_minus_one( status );
}
/* add oob offset of region start to provided offset */
*offset += region_page_index * oob_bytes_per_page;
return 0;
}
static int rtems_flashdev_ioctl_region_oob_read(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
)
{
int status = 0;
rtems_flashdev_ioctl_oob_rw_info *rw_info = arg;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
status = rtems_flashdev_get_region_oob_addr( flash, iop, &rw_info->offset);
if (status != 0) {
rtems_set_errno_and_return_minus_one( status );
}
return rtems_flashdev_ioctl_oob_read(flash, arg);
}
static int rtems_flashdev_ioctl_oob_write( rtems_flashdev *flash, void *arg )
{
rtems_flashdev_ioctl_oob_rw_info *rw_info;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->oob_write == NULL ) {
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
rw_info = (rtems_flashdev_ioctl_oob_rw_info *) arg;
return ( *flash->oob_write )(
flash, rw_info->offset, rw_info->count, rw_info->buffer
);
}
}
static int rtems_flashdev_ioctl_region_oob_write(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
)
{
int status = 0;
rtems_flashdev_ioctl_oob_rw_info *rw_info = arg;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
status = rtems_flashdev_get_region_oob_addr( flash, iop, &rw_info->offset);
if (status != 0) {
rtems_set_errno_and_return_minus_one( status );
}
return rtems_flashdev_ioctl_oob_write(flash, arg);
}
static int rtems_flashdev_ioctl_sector_mark_bad(
rtems_flashdev *flash,
void *arg
)
@@ -901,13 +1198,69 @@ static int rtems_flashdev_ioctl_write_block_size(
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->write_block_size == NULL ) {
return 0;
if ( flash->sector_mark_bad == NULL ) {
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
return ( *flash->write_block_size )( flash, ( (size_t *) arg ) );
return ( *flash->sector_mark_bad)( flash, *(uintptr_t *) arg );
}
}
static int rtems_flashdev_ioctl_region_sector_mark_bad(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
)
{
off_t *sector_offset = arg;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if (rtems_flashdev_get_abs_addr(flash, iop, 0, sector_offset) != 0) {
return -1;
}
return rtems_flashdev_ioctl_sector_mark_bad(flash, arg);
}
static int rtems_flashdev_ioctl_sectorhealth(
rtems_flashdev *flash,
void *arg
)
{
rtems_flashdev_ioctl_sector_health *sector_health;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flash->sector_health == NULL ) {
rtems_set_errno_and_return_minus_one( ENOSYS );
} else {
sector_health = arg;
return ( *flash->sector_health)( flash, sector_health->location, &sector_health->sector_bad );
}
}
static int rtems_flashdev_ioctl_region_sectorhealth(
rtems_flashdev *flash,
rtems_libio_t *iop,
void *arg
)
{
rtems_flashdev_ioctl_sector_health *sector_health = arg;
if ( arg == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if (rtems_flashdev_get_abs_addr(flash, iop, 0, &sector_health->location) != 0) {
return -1;
}
return rtems_flashdev_ioctl_sectorhealth(flash, arg);
}
static uint32_t rtems_flashdev_find_unallocated_region(
rtems_flashdev_region_table *region_table
)

File diff suppressed because it is too large Load Diff

View File

@@ -162,6 +162,71 @@ typedef struct rtems_flashdev rtems_flashdev;
*/
#define RTEMS_FLASHDEV_IOCTL_SECTOR_COUNT 12
/**
* @brief Get the size and address of flash erase sector at given offset
*
* The offset ignores the region limiting. To find sector of region
* limited offset add the base of the region to the desired offset.
*
* @param[in,out] rtems_flashdev_ioctl_sector_info arg Pointer to struct
* with offset and space for return values.
*/
#define RTEMS_FLASHDEV_IOCTL_REGION_SECTORINFO_BY_OFFSET 13
/**
* @brief Get the number of bytes per page of out of band space.
*
* This IOCTL is only applicable to devices which have out of band space,
* typically NAND.
*
* @param[out] count size_t containing the number of bytes.
*/
#define RTEMS_FLASHDEV_IOCTL_OOB_BYTES_PER_PAGE 14
/**
* @brief Read bytes from the out of band space.
*
* This IOCTL is only applicable to devices which have out of band space,
* typically NAND.
*
* @param[in,out] rtems_flashdev_ioctl_oob_rw_info arg Pointer to struct
* with offset and space for return values.
*/
#define RTEMS_FLASHDEV_IOCTL_REGION_OOB_READ 15
/**
* @brief Read bytes from the out of band space.
*
* This IOCTL is only applicable to devices which have out of band space,
* typically NAND.
*
* @param[in,out] rtems_flashdev_ioctl_oob_rw_info arg Pointer to struct
* with offset and space for return values.
*/
#define RTEMS_FLASHDEV_IOCTL_REGION_OOB_WRITE 16
/**
* @brief Mark a sector as bad.
*
* Sectors are referred to as blocks in NAND devices. Not all devices have bad
* sector management.
*
* @param[in,out] off_t arg Pointer to a off_t holding the offset of the
* sector to be marked bad
*/
#define RTEMS_FLASHDEV_IOCTL_REGION_SECTOR_MARK_BAD 17
/**
* @brief Check whether a sector is bad.
*
* Sectors are referred to as blocks in NAND devices. Not all devices have bad
* sector management.
*
* @param[in,out] rtems_flashdev_ioctl_sector_health arg Pointer to struct
* with offset and return value.
*/
#define RTEMS_FLASHDEV_IOCTL_REGION_SECTOR_HEALTH 18
/**
* @brief The maximum number of region limited file descriptors
* allowed to be open at once.
@@ -250,6 +315,43 @@ typedef struct rtems_flashdev_ioctl_sector_info {
rtems_flashdev_region sector_info;
} rtems_flashdev_ioctl_sector_info;
/**
* @brief Sector information returned from IOCTL calls.
*/
typedef struct rtems_flashdev_ioctl_sector_health {
/**
* @brief Offset or index to find sector at.
*/
off_t location;
/**
* @brief Health information returned about the sector.
*
* Non-zero value indicates the sector is bad.
*/
uint8_t sector_bad;
} rtems_flashdev_ioctl_sector_health;
/**
* @brief Read/write information used with OOB IOCTL calls.
*/
typedef struct rtems_flashdev_ioctl_oob_rw_info {
/**
* @brief Offset at which to operate.
*/
off_t offset;
/**
* @brief Buffer on which to operate.
*/
void *buffer;
/**
* @brief Number of bytes to transfer.
*/
size_t count;
} rtems_flashdev_ioctl_oob_rw_info;
/**
* @brief Flash device.
*/
@@ -432,6 +534,92 @@ struct rtems_flashdev {
int *page_count
);
/**
* @brief Call to device driver to return the size of the out of band space.
*
* @param[in] flashdev Pointer to flash device.
* @param[out] oob_bytes_per_page The number of bytes of OOB space per page.
*
* @retval 0 Success.
* @retval non-zero Failed.
*/
int ( *oob_bytes_per_page )(
rtems_flashdev *flashdev,
size_t *oob_bytes_per_page
);
/**
* @brief Call to the device driver to read the out of band space of the flash
* device.
*
* @param[in] flash Pointer to flash device.
* @param[in] offset Address to read from.
* @param[in] count Number of bytes to read.
* @param[out] buffer Buffer for data to be read into.
*
* @retval 0 Successful operation.
* @retval 1 Failed operation.
*/
int ( *oob_read )(
rtems_flashdev *flash,
uintptr_t offset,
size_t count,
void *buffer
);
/**
* @brief Call to the device driver to write to the out of band space of the
* flash device.
*
* @param[in] flash Pointer to flash device.
* @param[in] offset Address to write to.
* @param[in] count Number of bytes to read.
* @param[in] buffer Buffer for data to be written from.
*
* @retval 0 Successful operation.
* @retval 1 Failed operation.
*/
int ( *oob_write )(
rtems_flashdev *flash,
uintptr_t offset,
size_t count,
const void *buffer
);
/**
* @brief Call to the device driver to mark a sector as being bad.
*
* Sectors are referred to as blocks in NAND devices. Not all devices have bad
* sector management.
*
* @param[in] flash Pointer to flash device.
* @param[in] offset Address of the beginning of the sector.
*
* @retval 0 Successful operation.
* @retval 1 Failed operation.
*/
int ( *sector_mark_bad )(
rtems_flashdev *flash,
off_t offset
);
/**
* @brief Call to device driver to get health of sector at given offset.
*
* @param[in] flash The flash device
* @param[in] search_offset The offset of the sector which info is to be
* returned.
* @param[out] sector_bad The disposition of the sector, non-zero being bad
*
* @retval 0 Success.
* @retval non-zero Failed.
*/
int ( *sector_health )(
rtems_flashdev *flash,
off_t search_offset,
uint8_t *sector_bad
);
/**
* @brief Destroys the flash device.
*
@@ -441,6 +629,16 @@ struct rtems_flashdev {
rtems_flashdev *flashdev
);
/**
* @brief Callback to destroy private data not owned directly by the flashdev
* framework.
*
* @param[in] flash Pointer to flash device.
*/
void ( *priv_destroy )(
rtems_flashdev *flashdev
);
/**
* @brief Pointer to device driver.
*/
@@ -493,7 +691,8 @@ int rtems_flashdev_init(
/**
* @brief Register the flash device.
*
* This function always claims ownership of the flash device.
* This function always claims ownership of the flash device passed to it. Once
* registered, the flash device can only be destroyed by unregistering it.
*
* After initialization and before registration read, write, erase, jedec_id
* and flash_type functions need to be set in the flashdev.
@@ -509,9 +708,24 @@ int rtems_flashdev_register(
const char *flash_path
);
/**
* @brief Unregister the flash device.
*
* @param[in] flash The flash device.
*
* @retval 0 Successful operation.
* @retval non-zero Failed operation.
*/
int rtems_flashdev_unregister(
const char *flash_path
);
/**
* @brief Destroys the flash device.
*
* This function must only be used on rtems_flashdev instances that have not
* been registered.
*
* @param[in] flash The flash device.
*/
void rtems_flashdev_destroy(
@@ -521,6 +735,9 @@ void rtems_flashdev_destroy(
/**
* @brief Destroys the flash device and frees its memory.
*
* This function must only be used on rtems_flashdev instances that have not
* been registered.
*
* @param[in] flash The flash device.
*/
void rtems_flashdev_destroy_and_free(

View File

@@ -58,6 +58,8 @@ void _Timecounter_Getmicrouptime(struct timeval *);
void _Timecounter_Getbintime(struct bintime *);
void _Timecounter_Getnanotime(struct timespec *);
void _Timecounter_Getmicrotime(struct timeval *);
void _Timecounter_Getboottime(struct timeval *);
void _Timecounter_Getboottimebin(struct bintime *);
__END_DECLS
#endif /* _MACHINE__TIMECOUNTER_H_ */

View File

@@ -103,8 +103,8 @@ typedef void ( *BSP_output_char_function_type )( char );
* This function pointer shall never be NULL. It shall be provided by the BSP
* and statically initialized. The referenced function shall output exactly
* the character specified by the parameter. In particular, it shall not
* perform character translations, for example ``NL`` to ``CR`` followed by
* ``NR``. The function shall not block.
* perform character translations, for example `NL` to `CR` followed by `NR`.
* The function shall not block.
*/
extern BSP_output_char_function_type BSP_output_char;
@@ -120,7 +120,7 @@ extern BSP_output_char_function_type BSP_output_char;
* The directive outputs the character specified by ``c`` to the kernel
* character output device using the polled character output implementation
* provided by #BSP_output_char. The directive performs a character
* translation from ``NL`` to ``CR`` followed by ``NR``.
* translation from `NL` to `CR` followed by `NR`.
*
* If the kernel character output device is concurrently accessed, then
* interleaved output may occur.
@@ -129,9 +129,9 @@ extern BSP_output_char_function_type BSP_output_char;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_putc( char c );
@@ -154,9 +154,9 @@ void rtems_putc( char c );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_put_char( int c, void *unused );
@@ -178,7 +178,7 @@ void rtems_put_char( int c, void *unused );
* @parblock
* The directive may be used to print debug and test information. It uses
* rtems_putc() to output the characters. This directive performs a character
* translation from ``NL`` to ``CR`` followed by ``NR``.
* translation from `NL` to `CR` followed by `NR`.
*
* If the kernel character output device is concurrently accessed, then
* interleaved output may occur.
@@ -188,9 +188,9 @@ void rtems_put_char( int c, void *unused );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int putk( const char *s );
@@ -214,7 +214,7 @@ int putk( const char *s );
* @parblock
* The directive may be used to print debug and test information. It uses
* rtems_putc() to output the characters. This directive performs a character
* translation from ``NL`` to ``CR`` followed by ``NR``.
* translation from `NL` to `CR` followed by `NR`.
*
* If the kernel character output device is concurrently accessed, then
* interleaved output may occur.
@@ -224,11 +224,11 @@ int putk( const char *s );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * Formatting of floating point numbers is not supported.
* - Formatting of floating point numbers is not supported.
* @endparblock
*/
RTEMS_PRINTFLIKE( 1, 2 ) int printk( const char *fmt, ... );
@@ -252,7 +252,7 @@ RTEMS_PRINTFLIKE( 1, 2 ) int printk( const char *fmt, ... );
* @parblock
* The directive may be used to print debug and test information. It uses
* rtems_putc() to output the characters. This directive performs a character
* translation from ``NL`` to ``CR`` followed by ``NR``.
* translation from `NL` to `CR` followed by `NR`.
*
* If the kernel character output device is concurrently accessed, then
* interleaved output may occur.
@@ -262,11 +262,11 @@ RTEMS_PRINTFLIKE( 1, 2 ) int printk( const char *fmt, ... );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * Formatting of floating point numbers is not supported.
* - Formatting of floating point numbers is not supported.
* @endparblock
*/
int vprintk( const char *fmt, va_list ap );
@@ -292,7 +292,7 @@ int vprintk( const char *fmt, va_list ap );
* @parblock
* The directive may be used to print debug and test information. It uses
* rtems_putc() to output the characters. This directive performs a character
* translation from ``NL`` to ``CR`` followed by ``NR``.
* translation from `NL` to `CR` followed by `NR`.
*
* If the kernel character output device is concurrently accessed, then
* interleaved output may occur.
@@ -302,11 +302,11 @@ int vprintk( const char *fmt, va_list ap );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * Formatting of floating point numbers is not supported.
* - Formatting of floating point numbers is not supported.
* @endparblock
*/
int rtems_printk_printer( void *unused, const char *fmt, va_list ap );
@@ -359,9 +359,9 @@ extern BSP_polling_getchar_function_type BSP_poll_char;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int getchark( void );

View File

@@ -102,12 +102,12 @@ extern "C" {
* be generated by hand. RTEMS provides a set of macros system which provides a
* simple standard mechanism to automate the generation of these structures.
*
* The RTEMS header file ``<rtems/confdefs.h>`` is at the core of the automatic
* The RTEMS header file `<rtems/confdefs.h>` is at the core of the automatic
* generation of system configuration. It is based on the idea of setting
* macros which define configuration parameters of interest to the application
* and defaulting or calculating all others. This variety of macros can
* automatically produce all of the configuration data required for an RTEMS
* application. The term ``confdefs`` is shorthand for a *Configuration
* application. The term `confdefs` is shorthand for a *Configuration
* Defaults*.
*
* As a general rule, application developers only specify values for the
@@ -122,7 +122,7 @@ extern "C" {
*
* For each configuration parameter in the configuration tables, the macro
* corresponding to that field is discussed. The RTEMS Maintainers expect that
* all systems can be easily configured using the ``<rtems/confdefs.h>``
* all systems can be easily configured using the `<rtems/confdefs.h>`
* mechanism and that using this mechanism will avoid internal RTEMS
* configuration changes impacting applications.
*
@@ -160,9 +160,9 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_stack_allocator_avoids_work_space() \
@@ -187,9 +187,9 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uintptr_t rtems_configuration_get_stack_space_size( void );
@@ -239,7 +239,7 @@ typedef Stack_Allocator_free rtems_stack_free_hook;
* @brief Gets the RTEMS build label.
*
* The build label is a user-provided string defined by the build configuration
* through the ``RTEMS_BUILD_LABEL`` build option. The format of the string is
* through the `RTEMS_BUILD_LABEL` build option. The format of the string is
* completely user-defined.
*
* @return Returns a pointer to the RTEMS build label.
@@ -256,9 +256,9 @@ typedef Stack_Allocator_free rtems_stack_free_hook;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const char *rtems_get_build_label( void );
@@ -276,9 +276,9 @@ const char *rtems_get_build_label( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const char *rtems_get_copyright_notice( void );
@@ -310,9 +310,9 @@ const char *rtems_get_copyright_notice( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const char *rtems_get_target_hash( void );
@@ -334,9 +334,9 @@ const char *rtems_get_target_hash( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const char *rtems_get_version_string( void );
@@ -360,9 +360,9 @@ const char *rtems_get_version_string( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_do_zero_of_workspace() _Memory_Zero_before_use
@@ -384,9 +384,9 @@ const char *rtems_get_version_string( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_idle_task_stack_size() _Thread_Idle_stack_size
@@ -408,9 +408,9 @@ const char *rtems_get_version_string( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_idle_task() _Thread_Idle_body
@@ -432,9 +432,9 @@ const char *rtems_get_version_string( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_interrupt_stack_size() \
@@ -460,9 +460,9 @@ const char *rtems_get_version_string( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_extensions( void );
@@ -492,9 +492,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_maximum_processors() \
@@ -519,9 +519,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_microseconds_per_tick() \
@@ -546,9 +546,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_milliseconds_per_tick() \
@@ -573,9 +573,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_nanoseconds_per_tick() \
@@ -601,9 +601,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_number_of_initial_extensions() \
@@ -628,9 +628,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_stack_allocate_for_idle_hook() \
@@ -655,9 +655,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_stack_allocate_hook() _Stack_Allocator_allocate
@@ -681,9 +681,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_stack_allocate_init_hook() \
@@ -708,9 +708,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_stack_free_hook() _Stack_Allocator_free
@@ -733,9 +733,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_ticks_per_timeslice() \
@@ -760,9 +760,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_unified_work_area() _Workspace_Is_unified
@@ -781,9 +781,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_user_extension_table() \
@@ -803,9 +803,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#if defined(RTEMS_MULTIPROCESSING)
@@ -830,9 +830,9 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_configuration_get_work_space_size() \
@@ -855,11 +855,11 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_resource_is_unlimited( _resource ) \
@@ -880,11 +880,11 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_resource_maximum_per_allocation( _resource ) \
@@ -911,11 +911,11 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_resource_unlimited( _resource ) \

View File

@@ -90,9 +90,9 @@ struct rtems_printer;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_cpu_info_report( const struct rtems_printer *printer );
@@ -111,12 +111,12 @@ int rtems_cpu_info_report( const struct rtems_printer *printer );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -135,12 +135,12 @@ void rtems_cpu_usage_report( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -157,12 +157,12 @@ void rtems_cpu_usage_report_with_plugin( const struct rtems_printer *printer );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -182,12 +182,12 @@ void rtems_cpu_usage_reset( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
* @endparblock
*/
@@ -210,12 +210,12 @@ void rtems_cpu_usage_top( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
* @endparblock
*/

View File

@@ -100,15 +100,15 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
* @endparblock
*/
@@ -217,10 +217,10 @@ typedef Internal_errors_Source rtems_fatal_source;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id );
@@ -298,15 +298,15 @@ typedef User_extensions_Table rtems_extensions_table;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The number of extension sets available to the application is configured
* - The number of extension sets available to the application is configured
* through the @ref CONFIGURE_MAXIMUM_USER_EXTENSIONS application
* configuration option.
* @endparblock
@@ -345,9 +345,9 @@ rtems_status_code rtems_extension_create(
* @parblock
* The following constraints apply to functions of this type:
*
* * Thread dispatching is enabled.
* - Thread dispatching is enabled.
*
* * The executing thread is not the owner of the object allocator mutex.
* - The executing thread is not the owner of the object allocator mutex.
* @endparblock
*/
typedef User_extensions_thread_begin_extension rtems_task_begin_extension;
@@ -389,21 +389,21 @@ typedef User_extensions_thread_begin_extension rtems_task_begin_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * While the system is initialized, thread dispatching is disabled.
* - While the system is initialized, thread dispatching is disabled.
*
* * While the system is in the multitasking state, thread dispatching is
* - While the system is in the multitasking state, thread dispatching is
* enabled.
*
* * While an idle thread or another internal system thread is created, the
* - While an idle thread or another internal system thread is created, the
* object allocator mutex has no owner.
*
* * While a task is created by rtems_task_create(), the executing thread is
* - While a task is created by rtems_task_create(), the executing thread is
* the owner of the object allocator mutex.
*
* * While a task is constructed by rtems_task_construct(), the executing
* - While a task is constructed by rtems_task_construct(), the executing
* thread is the owner of the object allocator mutex.
*
* * While a task is created by pthread_create(), the executing thread is the
* - While a task is created by pthread_create(), the executing thread is the
* owner of the object allocator mutex.
* @endparblock
*/
@@ -439,21 +439,21 @@ typedef User_extensions_thread_create_extension rtems_task_create_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * While the system is initialized, thread dispatching is disabled.
* - While the system is initialized, thread dispatching is disabled.
*
* * While the system is in the multitasking state, thread dispatching is
* - While the system is in the multitasking state, thread dispatching is
* enabled.
*
* * While an idle thread or another internal system thread is created, the
* - While an idle thread or another internal system thread is created, the
* object allocator mutex has no owner.
*
* * While a task is created by rtems_task_create(), the executing thread is
* - While a task is created by rtems_task_create(), the executing thread is
* the owner of the object allocator mutex.
*
* * While a task is constructed by rtems_task_construct(), the executing
* - While a task is constructed by rtems_task_construct(), the executing
* thread is the owner of the object allocator mutex.
*
* * While a task is created by pthread_create(), the executing thread is the
* - While a task is created by pthread_create(), the executing thread is the
* owner of the object allocator mutex.
* @endparblock
*/
@@ -475,7 +475,7 @@ typedef User_extensions_thread_delete_extension rtems_task_delete_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * Thread dispatching is enabled.
* - Thread dispatching is enabled.
* @endparblock
*/
typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension;
@@ -508,11 +508,11 @@ typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * Thread dispatching is enabled.
* - Thread dispatching is enabled.
*
* * Thread life is protected.
* - Thread life is protected.
*
* * The executing thread is not the owner of the object allocator mutex.
* - The executing thread is not the owner of the object allocator mutex.
* @endparblock
*/
typedef User_extensions_thread_restart_extension rtems_task_restart_extension;
@@ -544,7 +544,7 @@ typedef User_extensions_thread_restart_extension rtems_task_restart_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * Thread dispatching is disabled.
* - Thread dispatching is disabled.
* @endparblock
*/
typedef User_extensions_thread_start_extension rtems_task_start_extension;
@@ -599,9 +599,9 @@ typedef User_extensions_thread_start_extension rtems_task_start_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * Thread dispatching is disabled.
* - Thread dispatching is disabled.
*
* * Where the system was built with SMP support enabled, maskable interrupts
* - Where the system was built with SMP support enabled, maskable interrupts
* are disabled for the executing thread.
* @endparblock
*/
@@ -634,11 +634,11 @@ typedef User_extensions_thread_switch_extension rtems_task_switch_extension;
* @parblock
* The following constraints apply to functions of this type:
*
* * Thread dispatching is enabled.
* - Thread dispatching is enabled.
*
* * Thread life is protected.
* - Thread life is protected.
*
* * The executing thread is not the owner of the object allocator mutex.
* - The executing thread is not the owner of the object allocator mutex.
* @endparblock
*/
typedef User_extensions_thread_terminate_extension rtems_task_terminate_extension;

View File

@@ -139,17 +139,17 @@ typedef CPU_Exception_frame rtems_exception_frame;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not return to the caller.
* - The directive will not return to the caller.
*
* * The directive invokes the fatal error extensions in extension forward
* - The directive invokes the fatal error extensions in extension forward
* order.
*
* * The directive does not invoke handlers registered by atexit() or
* - The directive does not invoke handlers registered by atexit() or
* on_exit().
*
* * The directive may terminate the system.
* - The directive may terminate the system.
* @endparblock
*/
RTEMS_NO_RETURN static inline void rtems_fatal(
@@ -180,17 +180,17 @@ RTEMS_NO_RETURN static inline void rtems_fatal(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not return to the caller.
* - The directive will not return to the caller.
*
* * The directive invokes the fatal error extensions in extension forward
* - The directive invokes the fatal error extensions in extension forward
* order.
*
* * The directive does not invoke handlers registered by atexit() or
* - The directive does not invoke handlers registered by atexit() or
* on_exit().
*
* * The directive may terminate the system.
* - The directive may terminate the system.
* @endparblock
*/
RTEMS_NO_RETURN RTEMS_PRINTFLIKE( 1, 2 ) void rtems_panic(
@@ -235,7 +235,7 @@ static inline void rtems_exception_frame_print(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
* @endparblock
*/
const char *rtems_fatal_source_text( rtems_fatal_source fatal_source );
@@ -259,7 +259,7 @@ const char *rtems_fatal_source_text( rtems_fatal_source fatal_source );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
* @endparblock
*/
const char *rtems_internal_error_text( rtems_fatal_code internal_error_code );
@@ -286,17 +286,17 @@ const char *rtems_internal_error_text( rtems_fatal_code internal_error_code );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not return to the caller.
* - The directive will not return to the caller.
*
* * The directive invokes the fatal error extensions in extension forward
* - The directive invokes the fatal error extensions in extension forward
* order.
*
* * The directive does not invoke handlers registered by atexit() or
* - The directive does not invoke handlers registered by atexit() or
* on_exit().
*
* * The directive may terminate the system.
* - The directive may terminate the system.
* @endparblock
*/
RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t fatal_code );

View File

@@ -96,9 +96,9 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive should be called by boot_card() only.
* - The directive should be called by boot_card() only.
*
* * The directive will not return to the caller.
* - The directive will not return to the caller.
* @endparblock
*/
RTEMS_NO_RETURN void rtems_initialize_executive( void );
@@ -120,17 +120,17 @@ RTEMS_NO_RETURN void rtems_initialize_executive( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not return to the caller.
* - The directive will not return to the caller.
*
* * The directive invokes the fatal error extensions in extension forward
* - The directive invokes the fatal error extensions in extension forward
* order.
*
* * The directive does not invoke handlers registered by atexit() or
* - The directive does not invoke handlers registered by atexit() or
* on_exit().
*
* * The directive may terminate the system.
* - The directive may terminate the system.
* @endparblock
*/
RTEMS_NO_RETURN void rtems_shutdown_executive( uint32_t fatal_code );

View File

@@ -18,6 +18,8 @@
* Modifications to support reference counting in the file system are
* Copyright (C) 2012 embedded brains GmbH & Co. KG
*
* Copyright (C) 2025 Contemporary Software
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -1378,18 +1380,23 @@ typedef struct {
} rtems_libio_ioctl_args_t;
/**
* @name Flag Values
* @name Flag Values and Masks
*/
/**@{**/
#define LIBIO_FLAGS_NO_DELAY 0x0001U /* return immediately if no data */
#define LIBIO_FLAGS_READ 0x0002U /* reading */
#define LIBIO_FLAGS_WRITE 0x0004U /* writing */
#define LIBIO_FLAGS_OPEN 0x0100U /* device is open */
#define LIBIO_FLAGS_APPEND 0x0200U /* all writes append */
#define LIBIO_FLAGS_CLOSE_ON_EXEC 0x0800U /* close on process exec() */
#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
#define LIBIO_FLAGS_REFERENCE_INC 0x1000U
#define LIBIO_FLAGS_FREE 0x0001U /* on the free list */
#define LIBIO_FLAGS_NO_DELAY 0x0002U /* return immediately if no data */
#define LIBIO_FLAGS_READ 0x0004U /* reading */
#define LIBIO_FLAGS_WRITE 0x0008U /* writing */
#define LIBIO_FLAGS_OPEN 0x0100U /* device is open */
#define LIBIO_FLAGS_APPEND 0x0200U /* all writes append */
#define LIBIO_FLAGS_CLOSE_BUSY 0x0400U /* close with refs held */
#define LIBIO_FLAGS_CLOSE_ON_EXEC 0x0800U /* close on process exec() */
#define LIBIO_FLAGS_REFERENCE_INC 0x1000U
/* masks */
#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
#define LIBIO_FLAGS_FLAGS_MASK (LIBIO_FLAGS_REFERENCE_INC - 1U)
#define LIBIO_FLAGS_REFERENCE_MASK (~LIBIO_FLAGS_FLAGS_MASK)
/** @} */
@@ -1398,6 +1405,20 @@ static inline unsigned int rtems_libio_iop_flags( const rtems_libio_t *iop )
return _Atomic_Load_uint( &iop->flags, ATOMIC_ORDER_RELAXED );
}
/**
* @brief Returns true if the iop is a bad file descriptor, otherwise
* returns false. A bad file descriptor means free or not open.
*
* @param[in] flags The flags.
*/
static inline unsigned int rtems_libio_iop_flags_bad_fd(
const unsigned int flags
)
{
return ( ( flags & LIBIO_FLAGS_FREE ) != 0 )
|| ( ( flags & LIBIO_FLAGS_OPEN ) == 0 );
}
/**
* @brief Returns true if this is a no delay iop, otherwise returns false.
*
@@ -1428,6 +1449,16 @@ static inline bool rtems_libio_iop_is_writeable( const rtems_libio_t *iop )
return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_WRITE ) != 0;
}
/**
* @brief Returns true if the iop is open, otherwise returns false.
*
* @param[in] iop The iop.
*/
static inline bool rtems_libio_iop_is_open( const rtems_libio_t *iop )
{
return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_OPEN ) != 0;
}
/**
* @brief Returns true if this is an append iop, otherwise returns false.
*
@@ -1438,6 +1469,28 @@ static inline bool rtems_libio_iop_is_append( const rtems_libio_t *iop )
return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_APPEND ) != 0;
}
/**
* @brief Returns true if the iop is held, otherwise returns false.
*
* @param[in] iop The iop.
*/
static inline bool rtems_libio_iop_is_held( const rtems_libio_t *iop )
{
const unsigned int ref_count =
rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_REFERENCE_MASK;
return ref_count != 0;
}
/**
* @brief Returns true if the iop is free, otherwise returns false.
*
* @param[in] iop The iop.
*/
static inline bool rtems_libio_iop_is_free( const rtems_libio_t *iop )
{
return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_FREE ) != 0;
}
/**
* @name External I/O Handlers
*/

View File

@@ -103,6 +103,63 @@ extern rtems_filesystem_mount_table_entry_t rtems_filesystem_null_mt_entry;
*/
extern rtems_filesystem_global_location_t rtems_filesystem_global_location_null;
/*
* File Descriptor Routine Prototypes
*/
/**
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate(void);
/**
* Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
*/
unsigned int rtems_libio_from_fcntl_flags( int fcntl_flags );
/**
* Convert RTEMS internal flags to UNIX fnctl(2) flags
*/
int rtems_libio_to_fcntl_flags( unsigned int flags );
/**
* This routine frees the resources associated with an IOP (file
* descriptor) and clears the slot in the IOP Table. No checks are
* made on the state of the IOP.
*/
void rtems_libio_free_iop(
rtems_libio_t *iop
);
/**
* This routine frees the resources associated with an IOP (file
* descriptor) and clears the slot in the IOP Table. The IOP has to
* close (open flag not set) and no references held or the call will
* ignore the request.
*/
static inline void rtems_libio_free(
rtems_libio_t *iop
)
{
/*
* The IOP cannot be open and there can be no references held for it
* to be returned to the free list.
*
* Note, the open flag indicates the user owns the fd that indexes
* the iop so consider it an indirect reference. We cannot return
* the iop to the free list while the user owns the fd.
*
* Read the flags once as it is an atomic and we need to test 2
* flags. No convenience call as this is the only case we have.
*/
const unsigned int flags = rtems_libio_iop_flags( iop );
if ( ( ( flags & LIBIO_FLAGS_OPEN ) == 0 )
&& ( ( flags & LIBIO_FLAGS_REFERENCE_MASK ) == 0 ) ) {
rtems_libio_free_iop( iop );
}
}
/**
* @brief Sets the specified flags in the iop.
*
@@ -184,6 +241,7 @@ static inline void rtems_libio_iop_drop( rtems_libio_t *iop )
_Assert( flags >= LIBIO_FLAGS_REFERENCE_INC );
desired = flags - LIBIO_FLAGS_REFERENCE_INC;
success = _Atomic_Compare_exchange_uint(
&iop->flags,
&flags,
@@ -199,6 +257,8 @@ static inline void rtems_libio_iop_drop( rtems_libio_t *iop )
ATOMIC_ORDER_RELEASE
);
#endif
/* free the IOP is not open or held */
rtems_libio_free( iop );
}
/*
@@ -218,56 +278,83 @@ static inline void rtems_libio_iop_drop( rtems_libio_t *iop )
*/
#define rtems_libio_check_is_open(_iop) \
do { \
if ((rtems_libio_iop_flags(_iop) & LIBIO_FLAGS_OPEN) == 0) { \
errno = EBADF; \
return -1; \
} \
do { \
if (rtems_libio_iop_is_open(_iop)) { \
errno = EBADF; \
return -1; \
} \
} while (0)
/**
* @brief Macro to get the iop for the specified file descriptor.
* @brief Function to get the iop for the specified file descriptor.
*
* Checks that the file descriptor is in the valid range and open.
*/
static inline int rtems_libio_get_iop( int fd, rtems_libio_t **iop )
{
unsigned int flags;
if ( (uint32_t) ( fd ) >= rtems_libio_number_iops ) {
return EBADF;
}
*iop = rtems_libio_iop( fd );
flags = rtems_libio_iop_hold( *iop );
if ( rtems_libio_iop_flags_bad_fd( flags ) ) {
rtems_libio_iop_drop( *iop );
return EBADF;
}
return 0;
}
/**
* @brief Macro to get the iop for the specified file descriptor.
*/
#define LIBIO_GET_IOP( _fd, _iop ) \
do { \
unsigned int _flags; \
if ( (uint32_t) ( _fd ) >= rtems_libio_number_iops ) { \
rtems_set_errno_and_return_minus_one( EBADF ); \
} \
_iop = rtems_libio_iop( _fd ); \
_flags = rtems_libio_iop_hold( _iop ); \
if ( ( _flags & LIBIO_FLAGS_OPEN ) == 0 ) { \
rtems_libio_iop_drop( _iop ); \
rtems_set_errno_and_return_minus_one( EBADF ); \
int _error = rtems_libio_get_iop( _fd, &_iop ); \
if ( _error != 0 ) { \
rtems_set_errno_and_return_minus_one( _error ); \
} \
} while ( 0 )
/**
* @brief Macro to get the iop for the specified file descriptor with access
* flags and error.
* @brief Function to get the iop for the specified file descriptor
* with access flags and error.
*
* Checks that the file descriptor is in the valid range and open.
*/
static inline int rtems_libio_get_iop_with_access(
int fd, rtems_libio_t **iop, unsigned int access_flags, int access_error
)
{
const unsigned int mandatory = LIBIO_FLAGS_OPEN | access_flags ;
unsigned int flags;
if ( (uint32_t) ( fd ) >= rtems_libio_number_iops ) {
return EBADF;
}
*iop = rtems_libio_iop( fd );
flags = rtems_libio_iop_hold( *iop );
if ( ( flags & mandatory ) != mandatory ) {
rtems_libio_iop_drop( *iop );
*iop = NULL;
if ( ( flags & LIBIO_FLAGS_OPEN ) == 0 ) {
return EBADF;
} else {
return access_error;
}
}
return 0;
}
/**
* @brief Macro to wrap the function to allow returning the IOP and
* using the error set and return macro.
*/
#define LIBIO_GET_IOP_WITH_ACCESS( _fd, _iop, _access_flags, _access_error ) \
do { \
unsigned int _flags; \
unsigned int _mandatory; \
if ( (uint32_t) ( _fd ) >= rtems_libio_number_iops ) { \
rtems_set_errno_and_return_minus_one( EBADF ); \
} \
_iop = rtems_libio_iop( _fd ); \
_flags = rtems_libio_iop_hold( _iop ); \
_mandatory = LIBIO_FLAGS_OPEN | ( _access_flags ); \
if ( ( _flags & _mandatory ) != _mandatory ) { \
int _error; \
rtems_libio_iop_drop( _iop ); \
if ( ( _flags & LIBIO_FLAGS_OPEN ) == 0 ) { \
_error = EBADF; \
} else { \
_error = _access_error; \
} \
int _error = rtems_libio_get_iop_with_access( \
_fd, &_iop, _access_flags, _access_error \
); \
if ( _error != 0 ) { \
rtems_set_errno_and_return_minus_one( _error ); \
} \
} while ( 0 )
@@ -435,34 +522,6 @@ int rtems_filesystem_utime_update(
struct timespec new_times[2]
);
/*
* File Descriptor Routine Prototypes
*/
/**
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate(void);
/**
* Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
*/
unsigned int rtems_libio_fcntl_flags( int fcntl_flags );
/**
* Convert RTEMS internal flags to UNIX fnctl(2) flags
*/
int rtems_libio_to_fcntl_flags( unsigned int flags );
/**
* This routine frees the resources associated with an IOP (file descriptor)
* and clears the slot in the IOP Table.
*/
void rtems_libio_free(
rtems_libio_t *iop
);
/**
* Return the number of open iop descriptors
*/

View File

@@ -315,12 +315,6 @@ rtems_aio_request *init_read_req( struct aiocb* aiocbp );
*/
void rtems_aio_completed_list_op( listcb *listcbp );
/**
* @brief generates event at list completion to end wait in lio_listio().
*
*/
void lio_notify_end_wait( union sigval attr );
#ifdef RTEMS_DEBUG
#include <assert.h>

View File

@@ -9,6 +9,7 @@
*/
/*
* Copyright (C) 2025 Mazen Adel Elmessady
* Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
* Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
*
@@ -148,18 +149,18 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The number of barriers available to the application is configured through
* - The number of barriers available to the application is configured through
* the @ref CONFIGURE_MAXIMUM_BARRIERS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
* @endparblock
@@ -213,9 +214,9 @@ rtems_status_code rtems_barrier_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id );
@@ -245,18 +246,18 @@ rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -304,9 +305,9 @@ rtems_status_code rtems_barrier_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
* @endparblock
*/
rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout );
@@ -339,16 +340,53 @@ rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/
rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released );
/* Generated from spec:/rtems/barrier/if/get-number-waiting */
/**
* @ingroup RTEMSAPIClassicBarrier
*
* @brief Gets the number of tasks waiting at the barrier.
*
* @param id is the barrier identifier.
*
* @param[out] waiting is the pointer to an uint32_t object. When the directive
* call is successful, the number of waiting tasks will be stored in this
* object.
*
* This directive gets the number of tasks waiting at the barrier specified by
* ``id``. The number of waiting tasks will be returned in ``waiting``.
*
* @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
*
* @retval ::RTEMS_INVALID_ADDRESS The ``waiting`` parameter was NULL.
*
* @retval ::RTEMS_INVALID_ID There was no barrier associated with the
* identifier specified by ``id``.
*
* @par Constraints
* @parblock
* The following constraints apply to this directive:
*
* - The directive may be called from within interrupt context.
*
* - The directive may be called from within task context.
* @endparblock
*/
rtems_status_code rtems_barrier_get_number_waiting(
rtems_id id,
uint32_t *waiting
);
#ifdef __cplusplus
}
#endif

View File

@@ -98,12 +98,12 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -150,12 +150,12 @@ rtems_status_code rtems_cache_coherent_add_area( void *begin, uintptr_t size );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -176,12 +176,12 @@ void *rtems_cache_coherent_allocate(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -196,9 +196,9 @@ void rtems_cache_coherent_free( void *ptr );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_freeze_data( void );
@@ -212,9 +212,9 @@ void rtems_cache_freeze_data( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_freeze_instruction( void );
@@ -228,9 +228,9 @@ void rtems_cache_freeze_instruction( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_unfreeze_data( void );
@@ -244,9 +244,9 @@ void rtems_cache_unfreeze_data( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_unfreeze_instruction( void );
@@ -269,9 +269,9 @@ void rtems_cache_unfreeze_instruction( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_flush_multiple_data_lines( const void *begin, size_t size );
@@ -302,9 +302,9 @@ void rtems_cache_flush_multiple_data_lines( const void *begin, size_t size );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_invalidate_multiple_data_lines(
@@ -335,9 +335,9 @@ void rtems_cache_invalidate_multiple_data_lines(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_invalidate_multiple_instruction_lines(
@@ -367,9 +367,9 @@ void rtems_cache_invalidate_multiple_instruction_lines(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_instruction_sync_after_code_change(
@@ -394,9 +394,9 @@ void rtems_cache_instruction_sync_after_code_change(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
size_t rtems_cache_get_maximal_line_size( void );
@@ -417,9 +417,9 @@ size_t rtems_cache_get_maximal_line_size( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
size_t rtems_cache_get_data_line_size( void );
@@ -440,9 +440,9 @@ size_t rtems_cache_get_data_line_size( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
size_t rtems_cache_get_instruction_line_size( void );
@@ -465,9 +465,9 @@ size_t rtems_cache_get_instruction_line_size( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
size_t rtems_cache_get_data_cache_size( uint32_t level );
@@ -492,9 +492,9 @@ size_t rtems_cache_get_data_cache_size( uint32_t level );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
size_t rtems_cache_get_instruction_cache_size( uint32_t level );
@@ -510,9 +510,9 @@ size_t rtems_cache_get_instruction_cache_size( uint32_t level );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_flush_entire_data( void );
@@ -528,9 +528,9 @@ void rtems_cache_flush_entire_data( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_invalidate_entire_data( void );
@@ -546,9 +546,9 @@ void rtems_cache_invalidate_entire_data( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_invalidate_entire_instruction( void );
@@ -564,9 +564,9 @@ void rtems_cache_invalidate_entire_instruction( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_enable_data( void );
@@ -590,9 +590,9 @@ void rtems_cache_enable_data( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_disable_data( void );
@@ -608,9 +608,9 @@ void rtems_cache_disable_data( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_enable_instruction( void );
@@ -626,9 +626,9 @@ void rtems_cache_enable_instruction( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
void rtems_cache_disable_instruction( void );
@@ -653,12 +653,12 @@ void rtems_cache_disable_instruction( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/

View File

@@ -136,18 +136,18 @@ struct bintime;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive may change the priority of a task. This may cause the
* - The directive may change the priority of a task. This may cause the
* calling task to be preempted.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * The time of day set by the directive shall be
* - The time of day set by the directive shall be
* 1988-01-01T00:00:00.000000000Z or later.
*
* * The time of day set by the directive shall be before
* - The time of day set by the directive shall be before
* 2100-01-01T00:00:00.000000000Z.
* @endparblock
*/
@@ -176,11 +176,11 @@ rtems_status_code rtems_clock_set( const rtems_time_of_day *time_of_day );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_of_day );
@@ -209,11 +209,11 @@ rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_of_day );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time_of_day );
@@ -246,11 +246,11 @@ rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time_of_day );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_realtime( struct timespec *time_snapshot );
@@ -283,11 +283,11 @@ void rtems_clock_get_realtime( struct timespec *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_realtime_bintime( struct bintime *time_snapshot );
@@ -320,11 +320,11 @@ void rtems_clock_get_realtime_bintime( struct bintime *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_realtime_timeval( struct timeval *time_snapshot );
@@ -358,11 +358,11 @@ void rtems_clock_get_realtime_timeval( struct timeval *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_realtime_coarse( struct timespec *time_snapshot );
@@ -396,11 +396,11 @@ void rtems_clock_get_realtime_coarse( struct timespec *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_realtime_coarse_bintime( struct bintime *time_snapshot );
@@ -434,11 +434,11 @@ void rtems_clock_get_realtime_coarse_bintime( struct bintime *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_realtime_coarse_timeval( struct timeval *time_snapshot );
@@ -473,11 +473,11 @@ void rtems_clock_get_realtime_coarse_timeval( struct timeval *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_monotonic( struct timespec *time_snapshot );
@@ -511,11 +511,11 @@ void rtems_clock_get_monotonic( struct timespec *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_monotonic_bintime( struct bintime *time_snapshot );
@@ -545,11 +545,11 @@ void rtems_clock_get_monotonic_bintime( struct bintime *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
int64_t rtems_clock_get_monotonic_sbintime( void );
@@ -583,11 +583,11 @@ int64_t rtems_clock_get_monotonic_sbintime( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_monotonic_timeval( struct timeval *time_snapshot );
@@ -623,11 +623,11 @@ void rtems_clock_get_monotonic_timeval( struct timeval *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_monotonic_coarse( struct timespec *time_snapshot );
@@ -663,11 +663,11 @@ void rtems_clock_get_monotonic_coarse( struct timespec *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_monotonic_coarse_bintime( struct bintime *time_snapshot );
@@ -703,11 +703,11 @@ void rtems_clock_get_monotonic_coarse_bintime( struct bintime *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_monotonic_coarse_timeval( struct timeval *time_snapshot );
@@ -734,11 +734,11 @@ void rtems_clock_get_monotonic_coarse_timeval( struct timeval *time_snapshot );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_boot_time( struct timespec *boot_time );
@@ -765,11 +765,11 @@ void rtems_clock_get_boot_time( struct timespec *boot_time );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_boot_time_bintime( struct bintime *boot_time );
@@ -796,11 +796,11 @@ void rtems_clock_get_boot_time_bintime( struct bintime *boot_time );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_boot_time_timeval( struct timeval *boot_time );
@@ -830,11 +830,11 @@ void rtems_clock_get_boot_time_timeval( struct timeval *boot_time );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
rtems_status_code rtems_clock_get_seconds_since_epoch(
@@ -860,9 +860,9 @@ rtems_status_code rtems_clock_get_seconds_since_epoch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_interval rtems_clock_get_ticks_per_second( void );
@@ -891,9 +891,9 @@ rtems_interval rtems_clock_get_ticks_per_second( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_interval rtems_clock_get_ticks_since_boot( void );
@@ -922,11 +922,11 @@ rtems_interval rtems_clock_get_ticks_since_boot( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
rtems_status_code rtems_clock_get_uptime( struct timespec *uptime );
@@ -949,11 +949,11 @@ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
void rtems_clock_get_uptime_timeval( struct timeval *uptime );
@@ -974,11 +974,11 @@ void rtems_clock_get_uptime_timeval( struct timeval *uptime );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
time_t rtems_clock_get_uptime_seconds( void );
@@ -999,11 +999,11 @@ time_t rtems_clock_get_uptime_seconds( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
uint64_t rtems_clock_get_uptime_nanoseconds( void );
@@ -1025,11 +1025,11 @@ uint64_t rtems_clock_get_uptime_nanoseconds( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
static inline rtems_interval rtems_clock_tick_later( rtems_interval delta )
@@ -1054,11 +1054,11 @@ static inline rtems_interval rtems_clock_tick_later( rtems_interval delta )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
static inline rtems_interval rtems_clock_tick_later_usec(
@@ -1115,11 +1115,11 @@ static inline rtems_interval rtems_clock_tick_later_usec(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
* @endparblock
*/
static inline bool rtems_clock_tick_before( rtems_interval ticks )
@@ -1140,12 +1140,12 @@ static inline bool rtems_clock_tick_before( rtems_interval ticks )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
* @endparblock
*/
rtems_status_code rtems_clock_tick( void );

View File

@@ -191,9 +191,9 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_barriers( void );
@@ -218,9 +218,9 @@ uint32_t rtems_configuration_get_maximum_barriers( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_message_queues( void );
@@ -245,9 +245,9 @@ uint32_t rtems_configuration_get_maximum_message_queues( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_partitions( void );
@@ -272,9 +272,9 @@ uint32_t rtems_configuration_get_maximum_partitions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_periods( void );
@@ -299,9 +299,9 @@ uint32_t rtems_configuration_get_maximum_periods( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_ports( void );
@@ -326,9 +326,9 @@ uint32_t rtems_configuration_get_maximum_ports( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_regions( void );
@@ -353,9 +353,9 @@ uint32_t rtems_configuration_get_maximum_regions( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_semaphores( void );
@@ -380,9 +380,9 @@ uint32_t rtems_configuration_get_maximum_semaphores( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_tasks( void );
@@ -407,9 +407,9 @@ uint32_t rtems_configuration_get_maximum_tasks( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_configuration_get_maximum_timers( void );
@@ -428,9 +428,9 @@ uint32_t rtems_configuration_get_maximum_timers( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const rtems_api_configuration_table *

View File

@@ -129,18 +129,18 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The number of ports available to the application is configured through the
* - The number of ports available to the application is configured through the
* @ref CONFIGURE_MAXIMUM_PORTS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
* @endparblock
@@ -195,9 +195,9 @@ rtems_status_code rtems_port_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_port_ident( rtems_name name, rtems_id *id );
@@ -225,18 +225,18 @@ rtems_status_code rtems_port_ident( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -253,7 +253,7 @@ rtems_status_code rtems_port_delete( rtems_id id );
*
* @param external is the external address to convert.
*
* @param[out] internal is the pointer to a ``void`` pointer object. When the
* @param[out] internal is the pointer to a `void` pointer object. When the
* directive call is successful, the external address associated with the
* internal address will be stored in this object.
*
@@ -272,14 +272,14 @@ rtems_status_code rtems_port_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_port_external_to_internal(
@@ -299,7 +299,7 @@ rtems_status_code rtems_port_external_to_internal(
*
* @param internal is the internal address to convert.
*
* @param[out] external is the pointer to a ``void`` pointer object. When the
* @param[out] external is the pointer to a `void` pointer object. When the
* directive call is successful, the external address associated with the
* internal address will be stored in this object.
*
@@ -319,14 +319,14 @@ rtems_status_code rtems_port_external_to_internal(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_port_internal_to_external(

View File

@@ -435,6 +435,23 @@ extern "C" {
*/
typedef uint32_t rtems_event_set;
/* Generated from spec:/rtems/event/if/system-aio-suspension-terminated */
/**
* @brief This event set constant represents the reserved system event that is
* internally used by aio_suspend to notify of suspension termination.
*/
#define RTEMS_EVENT_SYSTEM_AIO_SUSPENSION_TERMINATED RTEMS_EVENT_27
/* Generated from spec:/rtems/event/if/system-lio-list-completed */
/**
* @brief This event set constant represents the reserved system event
* internally used to notify list completion when lio_listio is called using
* LIO_WAIT.
*/
#define RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED RTEMS_EVENT_28
/* Generated from spec:/rtems/event/if/system-network-close */
/**
@@ -484,12 +501,12 @@ typedef uint32_t rtems_event_set;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
* @endparblock
*/
rtems_status_code rtems_event_system_receive(
@@ -512,14 +529,14 @@ rtems_status_code rtems_event_system_receive(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/
@@ -536,12 +553,6 @@ rtems_status_code rtems_event_system_send(
*/
#define RTEMS_EVENT_SYSTEM_SERVER RTEMS_EVENT_30
/**
* @brief This event set constant represents the reserved system event for
* aio list completion, used when lio_listio is called using LIO_WAIT.
*/
#define RTEMS_EVENT_SYSTEM_AIO_LIST RTEMS_EVENT_28
/* Generated from spec:/rtems/event/if/system-server-resume */
/**
@@ -567,12 +578,12 @@ rtems_status_code rtems_event_system_send(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
static inline void rtems_event_transient_clear( void )
@@ -600,12 +611,12 @@ static inline void rtems_event_transient_clear( void )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
* @endparblock
*/
static inline rtems_status_code rtems_event_transient_receive(
@@ -634,14 +645,14 @@ static inline rtems_status_code rtems_event_transient_receive(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/
@@ -708,14 +719,14 @@ static inline rtems_status_code rtems_event_transient_send( rtems_id id )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/
@@ -819,12 +830,12 @@ rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
* @endparblock
*/
rtems_status_code rtems_event_receive(

View File

@@ -172,16 +172,16 @@ typedef ISR_Handler rtems_isr;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive is only available where the target architecture support
* - The directive is only available where the target architecture support
* enabled simple vectored interrupts.
* @endparblock
*/
@@ -251,11 +251,11 @@ rtems_status_code rtems_interrupt_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * Where the system was built with SMP support enabled, the directive is not
* - Where the system was built with SMP support enabled, the directive is not
* available. Its use will result in compiler warnings and linker errors.
* The rtems_interrupt_local_disable() and rtems_interrupt_local_enable()
* directives are available in all build configurations.
@@ -293,16 +293,16 @@ rtems_status_code rtems_interrupt_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * While at least one maskable interrupt is pending, when the directive
* - While at least one maskable interrupt is pending, when the directive
* enables maskable interrupts, the pending interrupts are immediately
* serviced. The interrupt service routines may unblock higher priority
* tasks which may preempt the calling task.
*
* * Where the system was built with SMP support enabled, the directive is not
* - Where the system was built with SMP support enabled, the directive is not
* available. Its use will result in compiler warnings and linker errors.
* The rtems_interrupt_local_disable() and rtems_interrupt_local_enable()
* directives are available in all build configurations.
@@ -341,11 +341,11 @@ rtems_status_code rtems_interrupt_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * Where the system was built with SMP support enabled, the directive is not
* - Where the system was built with SMP support enabled, the directive is not
* available. Its use will result in compiler warnings and linker errors.
* The rtems_interrupt_local_disable() and rtems_interrupt_local_enable()
* directives are available in all build configurations.
@@ -419,9 +419,9 @@ rtems_status_code rtems_interrupt_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_interrupt_local_disable( _isr_cookie ) \
@@ -455,11 +455,11 @@ rtems_status_code rtems_interrupt_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * While at least one maskable interrupt is pending, when the directive
* - While at least one maskable interrupt is pending, when the directive
* enables maskable interrupts, the pending interrupts are immediately
* serviced. The interrupt service routines may unblock higher priority
* tasks which may preempt the calling task.
@@ -475,8 +475,8 @@ rtems_status_code rtems_interrupt_catch(
*
* @brief Checks if an ISR is in progress on the current processor.
*
* This directive returns ``true``, if the current processor is currently
* servicing an interrupt, and ``false`` otherwise. A return value of ``true``
* This directive returns `true`, if the current processor is currently
* servicing an interrupt, and `false` otherwise. A return value of `true`
* indicates that the caller is an interrupt service routine, **not** a task.
* The directives available to an interrupt service routine are restricted.
*
@@ -487,9 +487,9 @@ rtems_status_code rtems_interrupt_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_interrupt_is_in_progress() _ISR_Is_in_progress()
@@ -601,9 +601,9 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_interrupt_lock_destroy( _lock ) _ISR_lock_Destroy( _lock )
@@ -658,9 +658,9 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_interrupt_lock_acquire( _lock, _lock_context ) \
@@ -696,11 +696,11 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * While at least one maskable interrupt is pending, when the directive
* - While at least one maskable interrupt is pending, when the directive
* enables maskable interrupts, the pending interrupts are immediately
* serviced. The interrupt service routines may unblock higher priority
* tasks which may preempt the calling task.
@@ -748,9 +748,9 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#if ISR_LOCK_NEEDS_OBJECT
@@ -794,9 +794,9 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#if ISR_LOCK_NEEDS_OBJECT
@@ -827,9 +827,9 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define rtems_interrupt_lock_interrupt_disable( _lock_context ) \
@@ -843,7 +843,7 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @brief Declares an ISR lock object.
*
* @param _specifier is the storage-class specifier for the ISR lock to
* declare, for example ``extern`` or ``static``.
* declare, for example `extern` or `static`.
*
* @param _designator is the ISR lock object designator.
*
@@ -865,7 +865,7 @@ typedef ISR_lock_Context rtems_interrupt_lock_context;
* @brief Defines an ISR lock object.
*
* @param _specifier is the storage-class specifier for the ISR lock to
* declare, for example ``extern`` or ``static``.
* declare, for example `extern` or `static`.
*
* @param _designator is the ISR lock object designator.
*
@@ -1064,7 +1064,7 @@ typedef void ( *rtems_interrupt_per_handler_routine )(
* @parblock
* The following constraints apply to this structure:
*
* * Members of the type shall not be accessed directly by the application.
* - Members of the type shall not be accessed directly by the application.
* @endparblock
*/
typedef struct rtems_interrupt_entry {
@@ -1132,9 +1132,9 @@ typedef struct rtems_interrupt_entry {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
static inline void rtems_interrupt_entry_initialize(
@@ -1220,15 +1220,15 @@ static inline void rtems_interrupt_entry_initialize(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The interrupt entry shall have been initialized by
* - The interrupt entry shall have been initialized by
* rtems_interrupt_entry_initialize() or RTEMS_INTERRUPT_ENTRY_INITIALIZER().
* @endparblock
*/
@@ -1272,15 +1272,15 @@ rtems_status_code rtems_interrupt_entry_install(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The interrupt entry shall have been installed by
* - The interrupt entry shall have been installed by
* rtems_interrupt_entry_install().
* @endparblock
*/
@@ -1373,12 +1373,12 @@ rtems_status_code rtems_interrupt_entry_remove(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -1423,12 +1423,12 @@ rtems_status_code rtems_interrupt_handler_install(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -1447,7 +1447,7 @@ rtems_status_code rtems_interrupt_handler_remove(
*
* @param vector is the interrupt vector number.
*
* @param[out] enabled is the pointer to a ``bool`` object. When the directive
* @param[out] enabled is the pointer to a `bool` object. When the directive
* call is successful, the enabled status of the interrupt associated with
* the interrupt vector specified by ``vector`` will be stored in this
* object. When the interrupt was enabled for the processor executing the
@@ -1473,14 +1473,14 @@ rtems_status_code rtems_interrupt_handler_remove(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_vector_is_enabled(
@@ -1520,14 +1520,14 @@ rtems_status_code rtems_interrupt_vector_is_enabled(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_vector_enable( rtems_vector_number vector );
@@ -1564,14 +1564,14 @@ rtems_status_code rtems_interrupt_vector_enable( rtems_vector_number vector );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_vector_disable( rtems_vector_number vector );
@@ -1585,7 +1585,7 @@ rtems_status_code rtems_interrupt_vector_disable( rtems_vector_number vector );
*
* @param vector is the interrupt vector number.
*
* @param[out] pending is the pointer to a ``bool`` object. When the directive
* @param[out] pending is the pointer to a `bool` object. When the directive
* call is successful, the pending status of the interrupt associated with
* the interrupt vector specified by ``vector`` will be stored in this
* object. When the interrupt was pending for the processor executing the
@@ -1615,14 +1615,14 @@ rtems_status_code rtems_interrupt_vector_disable( rtems_vector_number vector );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_is_pending(
@@ -1655,14 +1655,14 @@ rtems_status_code rtems_interrupt_is_pending(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_raise( rtems_vector_number vector );
@@ -1701,14 +1701,14 @@ rtems_status_code rtems_interrupt_raise( rtems_vector_number vector );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_raise_on(
@@ -1741,14 +1741,14 @@ rtems_status_code rtems_interrupt_raise_on(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_clear( rtems_vector_number vector );
@@ -1784,14 +1784,14 @@ rtems_status_code rtems_interrupt_clear( rtems_vector_number vector );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_get_priority(
@@ -1892,14 +1892,14 @@ rtems_status_code rtems_interrupt_get_priority(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_set_priority(
@@ -1940,14 +1940,14 @@ rtems_status_code rtems_interrupt_set_priority(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_get_affinity(
@@ -2002,14 +2002,14 @@ rtems_status_code rtems_interrupt_get_affinity(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_set_affinity(
@@ -2233,14 +2233,14 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_interrupt_get_attributes(
@@ -2290,12 +2290,12 @@ rtems_status_code rtems_interrupt_get_attributes(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -2331,7 +2331,7 @@ rtems_status_code rtems_interrupt_handler_iterate(
* @parblock
* The following constraints apply to this structure:
*
* * Members of the type shall not be accessed directly by the application.
* - Members of the type shall not be accessed directly by the application.
* @endparblock
*/
typedef struct rtems_interrupt_server_control {
@@ -2388,7 +2388,7 @@ typedef struct rtems_interrupt_server_control {
* @parblock
* The following constraints apply to this structure:
*
* * Members of the type shall not be accessed directly by the application.
* - Members of the type shall not be accessed directly by the application.
* @endparblock
*/
typedef struct {
@@ -2491,12 +2491,12 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -2539,12 +2539,12 @@ rtems_status_code rtems_interrupt_server_initialize(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -2617,12 +2617,12 @@ rtems_status_code rtems_interrupt_server_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -2668,15 +2668,15 @@ rtems_status_code rtems_interrupt_server_handler_install(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
* @endparblock
@@ -2732,17 +2732,17 @@ rtems_status_code rtems_interrupt_server_handler_remove(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may change the processor affinity of a task. This may cause
* - The directive may change the processor affinity of a task. This may cause
* the calling task to be preempted.
*
* * The directive may change the priority of a task. This may cause the
* - The directive may change the priority of a task. This may cause the
* calling task to be preempted.
* @endparblock
*/
@@ -2780,13 +2780,13 @@ rtems_status_code rtems_interrupt_server_set_affinity(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
* @endparblock
*/
@@ -2815,13 +2815,13 @@ rtems_status_code rtems_interrupt_server_delete( uint32_t server_index );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
* @endparblock
*/
@@ -2850,13 +2850,13 @@ rtems_status_code rtems_interrupt_server_suspend( uint32_t server_index );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
* @endparblock
*/
@@ -2895,13 +2895,13 @@ rtems_status_code rtems_interrupt_server_resume( uint32_t server_index );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
* @endparblock
*/
@@ -2952,12 +2952,12 @@ rtems_status_code rtems_interrupt_server_move(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -2983,7 +2983,7 @@ rtems_status_code rtems_interrupt_server_handler_iterate(
* @parblock
* The following constraints apply to this structure:
*
* * Members of the type shall not be accessed directly by the application.
* - Members of the type shall not be accessed directly by the application.
* @endparblock
*/
typedef struct rtems_interrupt_server_action {
@@ -3022,7 +3022,7 @@ typedef struct rtems_interrupt_server_action {
* @parblock
* The following constraints apply to this structure:
*
* * Members of the type shall not be accessed directly by the application.
* - Members of the type shall not be accessed directly by the application.
* @endparblock
*/
typedef struct {
@@ -3078,12 +3078,12 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -3118,32 +3118,32 @@ rtems_status_code rtems_interrupt_server_entry_initialize(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The interrupt server entry shall have been initialized by
* - The interrupt server entry shall have been initialized by
* rtems_interrupt_server_entry_initialize() and further optional calls to
* rtems_interrupt_server_action_prepend().
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_action_prepend() with the same interrupt server
* entry. Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_entry_move() with the same interrupt server entry.
* Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_entry_submit() with the same interrupt server
* entry. Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called while the interrupt server entry is
* - The directive shall not be called while the interrupt server entry is
* pending on or serviced by its current interrupt server. Calling the
* directive under these conditions is undefined behaviour.
* @endparblock
@@ -3171,16 +3171,16 @@ void rtems_interrupt_server_action_prepend(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
*
* * The interrupt server entry shall have been initialized by
* - The interrupt server entry shall have been initialized by
* rtems_interrupt_server_entry_initialize() and further optional calls to
* rtems_interrupt_server_action_prepend().
* @endparblock
@@ -3220,25 +3220,25 @@ void rtems_interrupt_server_entry_destroy(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * The interrupt server entry shall have been initialized by
* - The interrupt server entry shall have been initialized by
* rtems_interrupt_server_entry_initialize() and further optional calls to
* rtems_interrupt_server_action_prepend().
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_action_prepend() with the same interrupt server
* entry. Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_entry_move() with the same interrupt server entry.
* Calling the directive under this condition is undefined behaviour.
* @endparblock
@@ -3269,31 +3269,31 @@ void rtems_interrupt_server_entry_submit(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The interrupt server entry shall have been initialized by
* - The interrupt server entry shall have been initialized by
* rtems_interrupt_server_entry_initialize() and further optional calls to
* rtems_interrupt_server_action_prepend().
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_action_prepend() with the same interrupt server
* entry. Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_entry_move() with the same interrupt server entry.
* Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_entry_submit() with the same interrupt server
* entry. Calling the directive under this condition is undefined behaviour.
*
* * The directive shall not be called while the interrupt server entry is
* - The directive shall not be called while the interrupt server entry is
* pending on or serviced by its current interrupt server. Calling the
* directive under these conditions is undefined behaviour.
* @endparblock
@@ -3323,7 +3323,7 @@ rtems_status_code rtems_interrupt_server_entry_move(
* @parblock
* The following constraints apply to this structure:
*
* * Members of the type shall not be accessed directly by the application.
* - Members of the type shall not be accessed directly by the application.
* @endparblock
*/
typedef struct {
@@ -3372,12 +3372,12 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -3414,29 +3414,29 @@ rtems_status_code rtems_interrupt_server_request_initialize(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The interrupt server request shall have been initialized by
* - The interrupt server request shall have been initialized by
* rtems_interrupt_server_request_initialize().
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_request_set_vector() with the same interrupt server
* request. Calling the directive under this condition is undefined
* behaviour.
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_request_submit() with the same interrupt server
* request. Calling the directive under this condition is undefined
* behaviour.
*
* * The directive shall not be called while the interrupt server entry is
* - The directive shall not be called while the interrupt server entry is
* pending on or serviced by its current interrupt server. Calling the
* directive under these conditions is undefined behaviour.
* @endparblock
@@ -3465,16 +3465,16 @@ static inline void rtems_interrupt_server_request_set_vector(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive shall not be called from within the context of an interrupt
* - The directive shall not be called from within the context of an interrupt
* server. Calling the directive from within the context of an interrupt
* server is undefined behaviour.
*
* * The directive sends a request to another task and waits for a response.
* - The directive sends a request to another task and waits for a response.
* This may cause the calling task to be blocked and unblocked.
*
* * The interrupt server request shall have been initialized by
* - The interrupt server request shall have been initialized by
* rtems_interrupt_server_request_initialize().
* @endparblock
*/
@@ -3516,20 +3516,20 @@ static inline void rtems_interrupt_server_request_destroy(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * The interrupt server request shall have been initialized by
* - The interrupt server request shall have been initialized by
* rtems_interrupt_server_request_initialize().
*
* * The directive shall not be called concurrently with
* - The directive shall not be called concurrently with
* rtems_interrupt_server_request_set_vector() with the same interrupt server
* request. Calling the directive under this condition is undefined
* behaviour.

View File

@@ -248,26 +248,26 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The number of message queues available to the application is configured
* - The number of message queues available to the application is configured
* through the @ref CONFIGURE_MAXIMUM_MESSAGE_QUEUES application
* configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
*
* * The number of global objects available to the application is configured
* - The number of global objects available to the application is configured
* through the @ref CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS application
* configuration option.
* @endparblock
@@ -351,26 +351,26 @@ rtems_status_code rtems_message_queue_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The number of message queues available to the application is configured
* - The number of message queues available to the application is configured
* through the @ref CONFIGURE_MAXIMUM_MESSAGE_QUEUES application
* configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
*
* * The number of global objects available to the application is configured
* - The number of global objects available to the application is configured
* through the @ref CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS application
* configuration option.
* @endparblock
@@ -447,9 +447,9 @@ rtems_status_code rtems_message_queue_construct(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_message_queue_ident(
@@ -503,21 +503,21 @@ rtems_status_code rtems_message_queue_ident(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -562,14 +562,14 @@ rtems_status_code rtems_message_queue_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -619,14 +619,14 @@ rtems_status_code rtems_message_queue_send(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -682,14 +682,14 @@ rtems_status_code rtems_message_queue_urgent(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -786,18 +786,18 @@ rtems_status_code rtems_message_queue_broadcast(
* @parblock
* The following constraints apply to this directive:
*
* * When a local queue is accessed and the #RTEMS_NO_WAIT option is set, the
* - When a local queue is accessed and the #RTEMS_NO_WAIT option is set, the
* directive may be called from within interrupt context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the request cannot be immediately satisfied and the #RTEMS_WAIT
* - When the request cannot be immediately satisfied and the #RTEMS_WAIT
* option is set, the calling task blocks at some point during the directive
* call.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -838,11 +838,11 @@ rtems_status_code rtems_message_queue_receive(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -884,14 +884,14 @@ rtems_status_code rtems_message_queue_get_number_pending(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count );

View File

@@ -122,14 +122,14 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/

View File

@@ -160,9 +160,9 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define RTEMS_OBJECT_ID_INITIAL( _api, _class, _node ) \
@@ -241,11 +241,11 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_id rtems_build_id(
@@ -284,11 +284,11 @@ rtems_id rtems_build_id(
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_name rtems_build_name( char c1, char c2, char c3, char c4 );
@@ -327,9 +327,9 @@ rtems_name rtems_build_name( char c1, char c2, char c3, char c4 );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_object_get_classic_name(
@@ -352,8 +352,8 @@ rtems_status_code rtems_object_get_classic_name(
* @param[out] name is the pointer to a buffer of the specified length.
*
* The object name is stored in the name buffer. If the name buffer length is
* greater than zero, then the stored object name will be ``NUL`` terminated.
* The stored object name may be truncated to fit the length. There is no
* greater than zero, then the stored object name will be `NUL` terminated. The
* stored object name may be truncated to fit the length. There is no
* indication if a truncation occurred. Every attempt is made to return name
* as a printable string even if the object has the Classic API 32-bit integer
* style name.
@@ -374,9 +374,9 @@ rtems_status_code rtems_object_get_classic_name(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
char *rtems_object_get_name( rtems_id id, size_t length, char *name );
@@ -427,12 +427,12 @@ char *rtems_object_get_name( rtems_id id, size_t length, char *name );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -456,11 +456,11 @@ rtems_status_code rtems_object_set_name( rtems_id id, const char *name );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_id_get_api( rtems_id id );
@@ -486,11 +486,11 @@ int rtems_object_id_get_api( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_id_get_class( rtems_id id );
@@ -516,11 +516,11 @@ int rtems_object_id_get_class( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_id_get_node( rtems_id id );
@@ -546,11 +546,11 @@ int rtems_object_id_get_node( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_id_get_index( rtems_id id );
@@ -573,11 +573,11 @@ int rtems_object_id_get_index( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_id_api_minimum( void );
@@ -600,11 +600,11 @@ int rtems_object_id_api_minimum( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_id_api_maximum( void );
@@ -629,9 +629,9 @@ int rtems_object_id_api_maximum( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_api_minimum_class( int api );
@@ -653,9 +653,9 @@ int rtems_object_api_minimum_class( int api );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
int rtems_object_api_maximum_class( int api );
@@ -680,9 +680,9 @@ int rtems_object_api_maximum_class( int api );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const char *rtems_object_get_api_name( int api );
@@ -712,9 +712,9 @@ const char *rtems_object_get_api_name( int api );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
const char *rtems_object_get_api_class_name( int the_api, int the_class );
@@ -746,9 +746,9 @@ const char *rtems_object_get_api_class_name( int the_api, int the_class );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_object_get_class_information(
@@ -770,9 +770,9 @@ rtems_status_code rtems_object_get_class_information(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
static inline uint16_t rtems_object_get_local_node( void )

View File

@@ -208,26 +208,26 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The number of partitions available to the application is configured
* - The number of partitions available to the application is configured
* through the @ref CONFIGURE_MAXIMUM_PARTITIONS application configuration
* option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
*
* * The number of global objects available to the application is configured
* - The number of global objects available to the application is configured
* through the @ref CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS application
* configuration option.
* @endparblock
@@ -308,9 +308,9 @@ rtems_status_code rtems_partition_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_partition_ident(
@@ -359,21 +359,21 @@ rtems_status_code rtems_partition_ident(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -388,7 +388,7 @@ rtems_status_code rtems_partition_delete( rtems_id id );
*
* @param id is the partition identifier.
*
* @param[out] buffer is the pointer to a ``void`` pointer object. When the
* @param[out] buffer is the pointer to a `void` pointer object. When the
* directive call is successful, the pointer to the allocated buffer will be
* stored in this object.
*
@@ -422,15 +422,15 @@ rtems_status_code rtems_partition_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * When the directive operates on a local object, the directive may be called
* - When the directive operates on a local object, the directive may be called
* from within interrupt context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the directive operates on a local object, the directive will not
* - When the directive operates on a local object, the directive will not
* cause the calling task to be preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -467,15 +467,15 @@ rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer );
* @parblock
* The following constraints apply to this directive:
*
* * When the directive operates on a local object, the directive may be called
* - When the directive operates on a local object, the directive may be called
* from within interrupt context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the directive operates on a local object, the directive will not
* - When the directive operates on a local object, the directive will not
* cause the calling task to be preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock

View File

@@ -261,18 +261,18 @@ struct rtems_printer;
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The number of periods available to the application is configured through
* - The number of periods available to the application is configured through
* the @ref CONFIGURE_MAXIMUM_PERIODS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
* @endparblock
@@ -321,9 +321,9 @@ rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id );
@@ -353,11 +353,11 @@ rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
*
* * The directive may be used exclusively by the task which created the
* - The directive may be used exclusively by the task which created the
* associated object.
* @endparblock
*/
@@ -387,18 +387,18 @@ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -454,9 +454,9 @@ rtems_status_code rtems_rate_monotonic_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be used exclusively by the task which created the
* - The directive may be used exclusively by the task which created the
* associated object.
* @endparblock
*/
@@ -482,23 +482,22 @@ rtems_status_code rtems_rate_monotonic_period(
* specified by ``id``. The detailed status of the period will be returned in
* the members of the period status object referenced by ``status``:
*
* * The ``owner`` member is set to the identifier of the owner task of the
* * The `owner` member is set to the identifier of the owner task of the
* period.
*
* * The ``state`` member is set to the current state of the period.
* * The `state` member is set to the current state of the period.
*
* * The ``postponed_jobs_count`` member is set to the count of jobs which are
* * The `postponed_jobs_count` member is set to the count of jobs which are
* not released yet.
*
* * If the current state of the period is ::RATE_MONOTONIC_INACTIVE, the
* ``since_last_period`` and ``executed_since_last_period`` members will be
* set to zero. Otherwise, both members will contain time information since
* the last successful invocation of the rtems_rate_monotonic_period()
* directive by the owner task. More specifically, the ``since_last_period``
* member will be set to the time elapsed since the last successful
* invocation. The ``executed_since_last_period`` member will be set to the
* processor time consumed by the owner task since the last successful
* invocation.
* `since_last_period` and `executed_since_last_period` members will be set
* to zero. Otherwise, both members will contain time information since the
* last successful invocation of the rtems_rate_monotonic_period() directive
* by the owner task. More specifically, the `since_last_period` member will
* be set to the time elapsed since the last successful invocation. The
* `executed_since_last_period` member will be set to the processor time
* consumed by the owner task since the last successful invocation.
*
* @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
*
@@ -511,11 +510,11 @@ rtems_status_code rtems_rate_monotonic_period(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_rate_monotonic_get_status(
@@ -540,27 +539,27 @@ rtems_status_code rtems_rate_monotonic_get_status(
* by ``id``. The statistics of the period will be returned in the members of
* the period statistics object referenced by ``status``:
*
* * The ``count`` member is set to the number of periods executed.
* * The `count` member is set to the number of periods executed.
*
* * The ``missed_count`` member is set to the number of periods missed.
* * The `missed_count` member is set to the number of periods missed.
*
* * The ``min_cpu_time`` member is set to the least amount of processor time
* * The `min_cpu_time` member is set to the least amount of processor time
* used in the period.
*
* * The ``max_cpu_time`` member is set to the highest amount of processor time
* * The `max_cpu_time` member is set to the highest amount of processor time
* used in the period.
*
* * The ``total_cpu_time`` member is set to the total amount of processor time
* * The `total_cpu_time` member is set to the total amount of processor time
* used in the period.
*
* * The ``min_wall_time`` member is set to the least amount of CLOCK_MONOTONIC
* * The `min_wall_time` member is set to the least amount of CLOCK_MONOTONIC
* time used in the period.
*
* * The ``max_wall_time`` member is set to the highest amount of
* CLOCK_MONOTONIC time used in the period.
* * The `max_wall_time` member is set to the highest amount of CLOCK_MONOTONIC
* time used in the period.
*
* * The ``total_wall_time`` member is set to the total amount of
* CLOCK_MONOTONIC time used in the period.
* * The `total_wall_time` member is set to the total amount of CLOCK_MONOTONIC
* time used in the period.
*
* @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
*
@@ -573,11 +572,11 @@ rtems_status_code rtems_rate_monotonic_get_status(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_rate_monotonic_get_statistics(
@@ -606,11 +605,11 @@ rtems_status_code rtems_rate_monotonic_get_statistics(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id );
@@ -629,9 +628,9 @@ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -651,9 +650,9 @@ void rtems_rate_monotonic_reset_all_statistics( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -675,9 +674,9 @@ void rtems_rate_monotonic_report_statistics( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/

View File

@@ -115,12 +115,12 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -211,18 +211,18 @@ rtems_status_code rtems_region_get_segment_size(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The number of regions available to the application is configured through
* - The number of regions available to the application is configured through
* the @ref CONFIGURE_MAXIMUM_REGIONS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
* @endparblock
@@ -278,9 +278,9 @@ rtems_status_code rtems_region_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id );
@@ -315,18 +315,18 @@ rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -372,12 +372,12 @@ rtems_status_code rtems_region_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -403,7 +403,7 @@ rtems_status_code rtems_region_extend(
* @param timeout is the timeout in clock ticks if the #RTEMS_WAIT option is
* set. Use #RTEMS_NO_TIMEOUT to wait potentially forever.
*
* @param[out] segment is the pointer to a ``void`` pointer object. When the
* @param[out] segment is the pointer to a `void` pointer object. When the
* directive call is successful, the begin address of the allocated segment
* will be stored in this object.
*
@@ -471,19 +471,19 @@ rtems_status_code rtems_region_extend(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the request cannot be immediately satisfied and the #RTEMS_WAIT
* - When the request cannot be immediately satisfied and the #RTEMS_WAIT
* option is set, the calling task blocks at some point during the directive
* call.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
* @endparblock
*/
rtems_status_code rtems_region_get_segment(
@@ -534,15 +534,15 @@ rtems_status_code rtems_region_get_segment(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -591,12 +591,12 @@ rtems_status_code rtems_region_return_segment( rtems_id id, void *segment );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -634,11 +634,11 @@ rtems_status_code rtems_region_resize_segment(
*
* @par Notes
* @parblock
* This is primarily intended as a mechanism to obtain a diagnostic
* information. This method forms am O(n) scan of the free and an O(n) scan of
* the used blocks in the region to calculate the information provided. Given
* that the execution time is driven by the number of used and free blocks, it
* can take a non-deterministic time to execute.
* This is primarily intended as a mechanism to obtain diagnostic information.
* This directive performs an O(n) scan of the free and an O(n) scan of the
* used blocks in the region to calculate the information provided. Given that
* the execution time is driven by the number of used and free blocks, it can
* take a non-deterministic time to execute.
*
* To get only the free information of the region use
* rtems_region_get_free_information().
@@ -648,12 +648,12 @@ rtems_status_code rtems_region_resize_segment(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -692,12 +692,12 @@ rtems_status_code rtems_region_get_information(
* rtems_region_get_information() directive but does not fill in the used
* information.
*
* This is primarily intended as a mechanism to obtain a diagnostic
* information. This method forms am O(n) scan of the free in the region to
* This is primarily intended as a mechanism to obtain diagnostic information.
* This directive performs an O(n) scan of the free blocks in the region to
* calculate the information provided. Given that the execution time is driven
* by the number of used and free blocks, it can take a non-deterministic time
* to execute. Typically, there are many used blocks and a much smaller number
* of used blocks making a call to this directive less expensive than a call to
* of free blocks making a call to this directive less expensive than a call to
* rtems_region_get_information().
* @endparblock
*
@@ -705,12 +705,12 @@ rtems_status_code rtems_region_get_information(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/

View File

@@ -82,10 +82,10 @@ extern "C" {
* necessity of scheduling tasks to run within a specified time limit after the
* occurrence of an event. For example, software embedded in life-support
* systems used to monitor hospital patients must take instant action if a
* change in the patients status is detected.
* change in the patient's status is detected.
*
* The component of RTEMS responsible for providing this capability is
* appropriately called the scheduler. The schedulers sole purpose is to
* appropriately called the scheduler. The scheduler's sole purpose is to
* allocate the all important resource of processor time to the various tasks
* competing for attention.
*/
@@ -125,9 +125,9 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_ident( rtems_name name, rtems_id *id );
@@ -158,9 +158,9 @@ rtems_status_code rtems_scheduler_ident( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_ident_by_processor(
@@ -207,9 +207,9 @@ rtems_status_code rtems_scheduler_ident_by_processor(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_ident_by_processor_set(
@@ -242,9 +242,9 @@ rtems_status_code rtems_scheduler_ident_by_processor_set(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_get_maximum_priority(
@@ -264,7 +264,7 @@ rtems_status_code rtems_scheduler_get_maximum_priority(
*
* @param priority is the Classic API task priority to map.
*
* @param[out] posix_priority is the pointer to an ``int`` object. When the
* @param[out] posix_priority is the pointer to an `int` object. When the
* directive call is successful, the POSIX thread priority value
* corresponding to the specified Classic API task priority value will be
* stored in this object.
@@ -282,9 +282,9 @@ rtems_status_code rtems_scheduler_get_maximum_priority(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_map_priority_to_posix(
@@ -323,9 +323,9 @@ rtems_status_code rtems_scheduler_map_priority_to_posix(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_map_priority_from_posix(
@@ -361,9 +361,9 @@ rtems_status_code rtems_scheduler_map_priority_from_posix(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_scheduler_get_processor( void );
@@ -395,9 +395,9 @@ uint32_t rtems_scheduler_get_processor( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
uint32_t rtems_scheduler_get_processor_maximum( void );
@@ -436,9 +436,9 @@ uint32_t rtems_scheduler_get_processor_maximum( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_scheduler_get_processor_set(
@@ -479,12 +479,12 @@ rtems_status_code rtems_scheduler_get_processor_set(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -530,12 +530,12 @@ rtems_status_code rtems_scheduler_add_processor(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/

View File

@@ -231,26 +231,26 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The number of semaphores available to the application is configured
* - The number of semaphores available to the application is configured
* through the @ref CONFIGURE_MAXIMUM_SEMAPHORES application configuration
* option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
*
* * The number of global objects available to the application is configured
* - The number of global objects available to the application is configured
* through the @ref CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS application
* configuration option.
* @endparblock
@@ -330,9 +330,9 @@ rtems_status_code rtems_semaphore_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_semaphore_ident(
@@ -387,21 +387,21 @@ rtems_status_code rtems_semaphore_ident(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -528,23 +528,23 @@ rtems_status_code rtems_semaphore_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * When a local, counting semaphore or a local, simple binary semaphore is
* - When a local, counting semaphore or a local, simple binary semaphore is
* accessed and the #RTEMS_NO_WAIT option is set, the directive may be called
* from within interrupt context.
*
* * When a local semaphore is accessed and the request can be immediately
* - When a local semaphore is accessed and the request can be immediately
* satisfied, the directive may be called from within device driver
* initialization context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the request cannot be immediately satisfied and the #RTEMS_WAIT
* - When the request cannot be immediately satisfied and the #RTEMS_WAIT
* option is set, the calling task blocks at some point during the directive
* call.
*
* * The timeout functionality of the directive requires a clock tick.
* - The timeout functionality of the directive requires a clock tick.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -609,18 +609,18 @@ rtems_status_code rtems_semaphore_obtain(
* @parblock
* The following constraints apply to this directive:
*
* * When a local, counting semaphore or a local, simple binary semaphore is
* - When a local, counting semaphore or a local, simple binary semaphore is
* accessed, the directive may be called from within interrupt context.
*
* * When a local semaphore is accessed, the directive may be called from
* - When a local semaphore is accessed, the directive may be called from
* within device driver initialization context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -706,18 +706,18 @@ rtems_status_code rtems_semaphore_release( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * When a local, counting semaphore or a local, simple binary semaphore is
* - When a local, counting semaphore or a local, simple binary semaphore is
* accessed, the directive may be called from within interrupt context.
*
* * When a local semaphore is accessed, the directive may be called from
* - When a local semaphore is accessed, the directive may be called from
* within device driver initialization context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -879,14 +879,14 @@ rtems_status_code rtems_semaphore_flush( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may change the priority of a task. This may cause the
* - The directive may change the priority of a task. This may cause the
* calling task to be preempted.
* @endparblock
*/

View File

@@ -127,9 +127,9 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_signal_catch(
@@ -183,17 +183,17 @@ rtems_status_code rtems_signal_catch(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the directive operates on a local object, the directive will not
* - When the directive operates on a local object, the directive will not
* cause the calling task to be preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock

View File

@@ -92,9 +92,9 @@ extern "C" {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
static inline bool rtems_is_name_valid( rtems_name name )
@@ -122,9 +122,9 @@ static inline bool rtems_is_name_valid( rtems_name name )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define RTEMS_MICROSECONDS_TO_TICKS( _us ) \
@@ -145,11 +145,11 @@ static inline bool rtems_is_name_valid( rtems_name name )
* @parblock
* The following constraints apply to this directive:
*
* * The directive is implemented by a macro and may be called from within
* - The directive is implemented by a macro and may be called from within
* C/C++ constant expressions. In addition, a function implementation of the
* directive exists for bindings to other programming languages.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define RTEMS_MILLISECONDS_TO_MICROSECONDS( _ms ) ( ( _ms ) * 1000UL )
@@ -173,9 +173,9 @@ static inline bool rtems_is_name_valid( rtems_name name )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
#define RTEMS_MILLISECONDS_TO_TICKS( _ms ) \
@@ -202,9 +202,9 @@ static inline bool rtems_is_name_valid( rtems_name name )
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
static inline void rtems_name_to_characters(
@@ -230,7 +230,7 @@ static inline void rtems_name_to_characters(
*
* @param bytes is the number of bytes to allocated.
*
* @param[out] pointer is the pointer to a ``void`` pointer object. When the
* @param[out] pointer is the pointer to a `void` pointer object. When the
* directive call is successful, the begin address of the allocated memory
* area will be stored in this object.
*
@@ -243,12 +243,12 @@ static inline void rtems_name_to_characters(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -270,12 +270,12 @@ bool rtems_workspace_allocate( size_t bytes, void **pointer );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -299,12 +299,12 @@ bool rtems_workspace_free( void *pointer );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -357,12 +357,12 @@ void *rtems_workspace_greedy_allocate(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/
@@ -388,12 +388,12 @@ void *rtems_workspace_greedy_allocate_all_except_largest(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/

View File

@@ -155,8 +155,8 @@ typedef struct {
* by rtems_task_construct() fails.
*
* The actual thread-local storage size is determined when the application
* executable is linked. The ``rtems-exeinfo`` command line tool included in
* the RTEMS Tools can be used to obtain the thread-local storage size and
* executable is linked. The `rtems-exeinfo` command line tool included in the
* RTEMS Tools can be used to obtain the thread-local storage size and
* alignment of an application executable.
*
* The application may configure the maximum thread-local storage size for all
@@ -495,8 +495,7 @@ typedef bool( *rtems_task_visitor )( rtems_tcb *, void * );
* #RTEMS_NO_ASR,
*
* * the interrupt level of the task: RTEMS_INTERRUPT_LEVEL() with a default of
* ``RTEMS_INTERRUPT_LEVEL( 0 )`` which is associated with enabled
* interrupts.
* `RTEMS_INTERRUPT_LEVEL( 0 )` which is associated with enabled interrupts.
*
* The **initial preemption mode** of the task is enabled or disabled.
*
@@ -632,25 +631,25 @@ typedef bool( *rtems_task_visitor )( rtems_tcb *, void * );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The number of tasks available to the application is configured through the
* - The number of tasks available to the application is configured through the
* @ref CONFIGURE_MAXIMUM_TASKS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
*
* * The number of global objects available to the application is configured
* - The number of global objects available to the application is configured
* through the @ref CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS application
* configuration option.
* @endparblock
@@ -750,25 +749,25 @@ rtems_status_code rtems_task_create(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The number of tasks available to the application is configured through the
* - The number of tasks available to the application is configured through the
* @ref CONFIGURE_MAXIMUM_TASKS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
*
* * The number of global objects available to the application is configured
* - The number of global objects available to the application is configured
* through the @ref CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS application
* configuration option.
* @endparblock
@@ -845,9 +844,9 @@ rtems_status_code rtems_task_construct(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_task_ident(
@@ -871,12 +870,12 @@ rtems_status_code rtems_task_ident(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_id rtems_task_self( void );
@@ -914,11 +913,11 @@ rtems_id rtems_task_self( void );
* @par Notes
* @parblock
* The type of the entry point argument is an unsigned integer type. However,
* the integer type has the property that any valid pointer to ``void`` can be
* converted to this type and then converted back to a pointer to ``void``.
* The result will compare equal to the original pointer. The type can
* represent at least 32 bits. Some applications use the entry point argument
* as an index into a parameter table to get task-specific parameters.
* the integer type has the property that any valid pointer to `void` can be
* converted to this type and then converted back to a pointer to `void`. The
* result will compare equal to the original pointer. The type can represent
* at least 32 bits. Some applications use the entry point argument as an
* index into a parameter table to get task-specific parameters.
*
* Any actions performed on a dormant task such as suspension or change of
* priority are nullified when the task is initiated via the rtems_task_start()
@@ -929,14 +928,14 @@ rtems_id rtems_task_self( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/
@@ -977,11 +976,11 @@ rtems_status_code rtems_task_start(
* @par Notes
* @parblock
* The type of the entry point argument is an unsigned integer type. However,
* the integer type has the property that any valid pointer to ``void`` can be
* converted to this type and then converted back to a pointer to ``void``.
* The result will compare equal to the original pointer. The type can
* represent at least 32 bits. Some applications use the entry point argument
* as an index into a parameter table to get task-specific parameters.
* the integer type has the property that any valid pointer to `void` can be
* converted to this type and then converted back to a pointer to `void`. The
* result will compare equal to the original pointer. The type can represent
* at least 32 bits. Some applications use the entry point argument as an
* index into a parameter table to get task-specific parameters.
*
* A new entry point argument may be used to distinguish between the initial
* rtems_task_start() of the task and any ensuing calls to rtems_task_restart()
@@ -995,17 +994,17 @@ rtems_status_code rtems_task_start(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may change the priority of a task. This may cause the
* - The directive may change the priority of a task. This may cause the
* calling task to be preempted.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
* @endparblock
*/
@@ -1084,21 +1083,21 @@ rtems_status_code rtems_task_restart(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * When the directive operates on a global object, the directive sends a
* - When the directive operates on a global object, the directive sends a
* message to remote nodes. This may preempt the calling task.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -1139,11 +1138,11 @@ rtems_status_code rtems_task_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not return to the caller.
* - The directive will not return to the caller.
*
* * While thread dispatching is disabled, if the directive performs a thread
* - While thread dispatching is disabled, if the directive performs a thread
* dispatch, then the fatal error with the fatal source INTERNAL_ERROR_CORE
* and the fatal code INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL will
* occur.
@@ -1186,14 +1185,14 @@ RTEMS_NO_RETURN void rtems_task_exit( void );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -1225,17 +1224,17 @@ rtems_status_code rtems_task_suspend( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may unblock a task. This may cause the calling task to be
* - The directive may unblock a task. This may cause the calling task to be
* preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -1268,14 +1267,14 @@ rtems_status_code rtems_task_resume( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_task_is_suspended( rtems_id id );
@@ -1334,17 +1333,17 @@ rtems_status_code rtems_task_is_suspended( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may change the priority of a task. This may cause the
* - The directive may change the priority of a task. This may cause the
* calling task to be preempted.
*
* * When the directive operates on a remote object, the directive sends a
* - When the directive operates on a remote object, the directive sends a
* message to the remote node and waits for a reply. This will preempt the
* calling task.
* @endparblock
@@ -1399,14 +1398,14 @@ rtems_status_code rtems_task_set_priority(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_task_get_priority(
@@ -1461,8 +1460,7 @@ rtems_status_code rtems_task_get_priority(
* #RTEMS_NO_ASR,
*
* * the interrupt level of the task: RTEMS_INTERRUPT_LEVEL() with a default of
* ``RTEMS_INTERRUPT_LEVEL( 0 )`` which is associated with enabled
* interrupts.
* `RTEMS_INTERRUPT_LEVEL( 0 )` which is associated with enabled interrupts.
*
* The **mode mask** specified in ``mask`` is built through a *bitwise or* of
* the mode mask constants described below.
@@ -1522,12 +1520,12 @@ rtems_status_code rtems_task_get_priority(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * When the directive enables preemption for the calling task, another task
* - When the directive enables preemption for the calling task, another task
* may preempt the calling task.
*
* * While thread dispatching is disabled, if the directive performs a thread
* - While thread dispatching is disabled, if the directive performs a thread
* dispatch, then the fatal error with the fatal source INTERNAL_ERROR_CORE
* and the fatal code INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL will
* occur.
@@ -1572,11 +1570,11 @@ rtems_status_code rtems_task_mode(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
*
* * While thread dispatching is disabled, if the directive performs a thread
* - While thread dispatching is disabled, if the directive performs a thread
* dispatch, then the fatal error with the fatal source INTERNAL_ERROR_CORE
* and the fatal code INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL will
* occur.
@@ -1613,11 +1611,11 @@ rtems_status_code rtems_task_wake_after( rtems_interval ticks );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive requires a Clock Driver.
* - The directive requires a Clock Driver.
*
* * While thread dispatching is disabled, if the directive performs a thread
* - While thread dispatching is disabled, if the directive performs a thread
* dispatch, then the fatal error with the fatal source INTERNAL_ERROR_CORE
* and the fatal code INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL will
* occur.
@@ -1655,14 +1653,14 @@ rtems_status_code rtems_task_wake_when( const rtems_time_of_day *time_buffer );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_task_get_scheduler(
@@ -1724,14 +1722,14 @@ rtems_status_code rtems_task_get_scheduler(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may change the priority of a task. This may cause the
* - The directive may change the priority of a task. This may cause the
* calling task to be preempted.
* @endparblock
*/
@@ -1779,14 +1777,14 @@ rtems_status_code rtems_task_set_scheduler(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_task_get_affinity(
@@ -1831,14 +1829,14 @@ rtems_status_code rtems_task_get_affinity(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may change the processor affinity of a task. This may cause
* - The directive may change the processor affinity of a task. This may cause
* the calling task to be preempted.
* @endparblock
*/
@@ -1877,12 +1875,12 @@ rtems_status_code rtems_task_set_affinity(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
* @endparblock
*/

View File

@@ -208,14 +208,14 @@ typedef struct {
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_get_information(
@@ -300,18 +300,18 @@ typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )( rtem
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The number of timers available to the application is configured through
* - The number of timers available to the application is configured through
* the @ref CONFIGURE_MAXIMUM_TIMERS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
* @endparblock
@@ -360,9 +360,9 @@ rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within any runtime context.
* - The directive may be called from within any runtime context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id );
@@ -391,14 +391,14 @@ rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_cancel( rtems_id id );
@@ -427,18 +427,18 @@ rtems_status_code rtems_timer_cancel( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The calling task does not have to be the task that created the object.
* - The calling task does not have to be the task that created the object.
* Any local task that knows the object identifier can delete the object.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may free memory to the RTEMS Workspace.
* @endparblock
*/
@@ -479,14 +479,14 @@ rtems_status_code rtems_timer_delete( rtems_id id );
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_fire_after(
@@ -534,14 +534,14 @@ rtems_status_code rtems_timer_fire_after(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_fire_when(
@@ -592,18 +592,18 @@ rtems_status_code rtems_timer_fire_when(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may obtain and release the object allocator mutex. This may
* - The directive may obtain and release the object allocator mutex. This may
* cause the calling task to be preempted.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The number of timers available to the application is configured through
* - The number of timers available to the application is configured through
* the @ref CONFIGURE_MAXIMUM_TIMERS application configuration option.
*
* * Where the object class corresponding to the directive is configured to use
* - Where the object class corresponding to the directive is configured to use
* unlimited objects, the directive may allocate memory from the RTEMS
* Workspace.
* @endparblock
@@ -651,14 +651,14 @@ rtems_status_code rtems_timer_initiate_server(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_server_fire_after(
@@ -708,14 +708,14 @@ rtems_status_code rtems_timer_server_fire_after(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_server_fire_when(
@@ -762,14 +762,14 @@ rtems_status_code rtems_timer_server_fire_when(
* @parblock
* The following constraints apply to this directive:
*
* * The directive may be called from within interrupt context.
* - The directive may be called from within interrupt context.
*
* * The directive may be called from within device driver initialization
* - The directive may be called from within device driver initialization
* context.
*
* * The directive may be called from within task context.
* - The directive may be called from within task context.
*
* * The directive will not cause the calling task to be preempted.
* - The directive will not cause the calling task to be preempted.
* @endparblock
*/
rtems_status_code rtems_timer_reset( rtems_id id );

View File

@@ -374,7 +374,7 @@ static inline size_t rtems_rtl_obj_align (size_t offset,
}
/**
* Is the symbol in this object's files globa symbol table?
* Is the symbol in this object's files global symbol table?
*
* @param obj The object file's descriptor to search.
* @param sym The symbol to check.

View File

@@ -97,6 +97,15 @@ bool rtems_rtl_symbol_table_open (rtems_rtl_symbols* symbols,
*/
void rtems_rtl_symbol_table_close (rtems_rtl_symbols* symbols);
/**
* Insert a symbol into a symbol table.
*
* @param symbols Symbol table
* @param symbols Symbol to add
*/
void rtems_rtl_symbol_global_insert (rtems_rtl_symbols* symbols,
rtems_rtl_obj_sym* symbol);
/**
* Add a table of exported symbols to the symbol table.
*

View File

@@ -432,7 +432,7 @@ extern "C" {
*
* @brief Gets the pointer reference type.
*
* @param _level is the pointer indirection level expressed in ``*``.
* @param _level is the pointer indirection level expressed in `*`.
*
* @param _target is the reference target type.
*
@@ -511,7 +511,7 @@ extern "C" {
* @brief Performs a type cast which removes qualifiers without warnings to the
* type for the variable.
*
* @param _ptr_level is the pointer indirection level expressed in ``*``.
* @param _ptr_level is the pointer indirection level expressed in `*`.
*
* @param _type is the target type of the cast.
*

View File

@@ -189,6 +189,23 @@ static inline void _CORE_barrier_Flush(
);
}
/**
* @brief Gets the number of threads waiting at the barrier.
*
* This routine returns the count of threads currently waiting at the barrier.
*
* @param[in] the_barrier The barrier to check.
* @param[in] queue_context The thread queue context.
*
* @return The number of threads currently waiting at the barrier.
*/
static inline uint32_t _CORE_barrier_Get_number_waiting(
const CORE_barrier_Control *the_barrier
)
{
return the_barrier->number_of_waiting_threads;
}
/** @} */
#ifdef __cplusplus

View File

@@ -232,7 +232,8 @@ typedef enum {
INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED = 43,
INTERNAL_ERROR_NO_MEMORY_FOR_IDLE_TASK_STORAGE = 44,
INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL = 45,
INTERNAL_ERROR_CANNOT_DISABLE_DATA_CACHE = 46
INTERNAL_ERROR_CANNOT_DISABLE_DATA_CACHE = 46,
INTERNAL_ERROR_LIBIO_STDIN_FD_OPEN_FAILED = 47,
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;

View File

@@ -335,7 +335,9 @@ static inline void _Priority_Set_action_node(
Priority_Node *node
)
{
#if defined(RTEMS_SMP)
_Assert( aggregation->Action.next == NULL );
#endif
aggregation->Action.node = node;
}
@@ -350,7 +352,9 @@ static inline void _Priority_Set_action_type(
Priority_Action_type type
)
{
#if defined(RTEMS_SMP)
_Assert( aggregation->Action.next == NULL );
#endif
aggregation->Action.type = type;
}
@@ -368,7 +372,9 @@ static inline void _Priority_Set_action(
Priority_Action_type type
)
{
#if defined(RTEMS_SMP)
_Assert( aggregation->Action.next == NULL );
#endif
aggregation->Action.node = node;
aggregation->Action.type = type;
}

View File

@@ -942,6 +942,12 @@ static inline Status_Control _Scheduler_Set(
#endif
#if defined(RTEMS_SCORE_THREAD_HAS_SCHEDULER_CHANGE_INHIBITORS)
if ( the_thread->is_scheduler_change_inhibited ) {
return STATUS_RESOURCE_IN_USE;
}
#endif
if ( the_thread->Wait.queue != NULL ) {
return STATUS_RESOURCE_IN_USE;
}

View File

@@ -96,9 +96,32 @@ extern "C" {
*/
#if defined(RTEMS_DEBUG)
/**
* @brief This define enables the thread resource count support.
*/
#define RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT
#endif
#if defined(RTEMS_POSIX_API)
/**
* @brief This define enables support for an inactive real thread priority.
*
* For example, the POSIX sporadic server may temporarily remove the real
* priority of a thread while it is in low priority mode.
*/
#define RTEMS_SCORE_THREAD_REAL_PRIORITY_MAY_BE_INACTIVE
#endif
#if defined(RTEMS_POSIX_API) && defined(RTEMS_SMP)
/**
* @brief This define enables support to inhibit scheduler changes.
*
* For example, the POSIX sporadic server adds a second priority to a thread.
* We cannot account for this priority in a scheduler change.
*/
#define RTEMS_SCORE_THREAD_HAS_SCHEDULER_CHANGE_INHIBITORS
#endif
/**
* @brief Type of the numeric argument of a thread entry function with at
* least one numeric argument.
@@ -898,6 +921,16 @@ struct _Thread_Control {
*/
bool was_created_with_inherited_scheduler;
#if defined(RTEMS_SCORE_THREAD_HAS_SCHEDULER_CHANGE_INHIBITORS)
/**
* @brief This field is true, if scheduler changes are inhibited.
*
* Currently, the POSIX sporadic server is the only inhibitor. If more are
* added, then this needs to be changed to a counter or a bit field.
*/
bool is_scheduler_change_inhibited;
#endif
/**
* @brief This member contains the CPU budget control used to manage the CPU
* budget of the thread.

View File

@@ -800,6 +800,14 @@ static inline void _Thread_Priority_change(
)
{
_Priority_Node_set_priority( priority_node, new_priority );
#if defined(RTEMS_SCORE_THREAD_REAL_PRIORITY_MAY_BE_INACTIVE)
if ( !_Priority_Node_is_active( priority_node ) ) {
/* The priority change is picked up once the node is added */
return;
}
#endif
_Thread_Priority_changed(
the_thread,
priority_node,

View File

@@ -45,26 +45,34 @@ int close(
)
{
rtems_libio_t *iop;
unsigned int flags;
int rc;
if ( (uint32_t) fd >= rtems_libio_number_iops ) {
rtems_set_errno_and_return_minus_one( EBADF );
}
iop = rtems_libio_iop( fd );
flags = rtems_libio_iop_flags( iop );
LIBIO_GET_IOP( fd, iop );
while ( true ) {
unsigned int flags;
unsigned int desired;
bool success;
flags = rtems_libio_iop_flags( iop );
if ( ( flags & LIBIO_FLAGS_OPEN ) == 0 ) {
rtems_libio_iop_drop( iop );
rtems_set_errno_and_return_minus_one( EBADF );
}
/* The expected flags */
flags &= LIBIO_FLAGS_REFERENCE_INC - 1U;
/**
* When LIBIO_FLAGS_CLOSE_BUSY is not set check that only one reference
* is held to prevent closing while busy. Otherwise atomically check that
* the flags match to ensure the reference count is maintained.
*/
if ( ( flags & LIBIO_FLAGS_CLOSE_BUSY ) == 0 ) {
flags &= LIBIO_FLAGS_FLAGS_MASK;
flags |= LIBIO_FLAGS_REFERENCE_INC;
}
desired = flags & ~LIBIO_FLAGS_OPEN;
success = _Atomic_Compare_exchange_uint(
@@ -79,14 +87,15 @@ int close(
break;
}
if ( ( flags & ~( LIBIO_FLAGS_REFERENCE_INC - 1U ) ) != 0 ) {
if ( ( flags & LIBIO_FLAGS_REFERENCE_MASK ) != LIBIO_FLAGS_REFERENCE_INC ) {
rtems_libio_iop_drop( iop );
rtems_set_errno_and_return_minus_one( EBUSY );
}
}
rc = (*iop->pathinfo.handlers->close_h)( iop );
rtems_libio_free( iop );
rtems_libio_iop_drop( iop );
return rc;
}

View File

@@ -58,7 +58,7 @@ static int duplicate_iop( rtems_libio_t *iop )
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
rtems_filesystem_instance_unlock( &iop->pathinfo );
rtems_libio_iop_flags_set( diop, rtems_libio_fcntl_flags( oflag ) );
rtems_libio_iop_flags_set( diop, rtems_libio_from_fcntl_flags( oflag ) );
/*
* XXX: We call the open handler here to have a proper open and close pair.
*
@@ -99,7 +99,7 @@ static int duplicate2_iop( rtems_libio_t *iop, int fd2 )
if (rv == 0) {
oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
rtems_libio_iop_flags_set( iop2, rtems_libio_fcntl_flags( oflag ) );
rtems_libio_iop_flags_set( iop2, rtems_libio_from_fcntl_flags( oflag ) );
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &iop2->pathinfo, &iop->pathinfo );
@@ -177,7 +177,7 @@ static int vfcntl(
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
flags = rtems_libio_from_fcntl_flags( va_arg( ap, int ) );
mask = LIBIO_FLAGS_NO_DELAY | LIBIO_FLAGS_APPEND;
/*
@@ -226,7 +226,10 @@ static int vfcntl(
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
if (err) {
if (err == 0 && !rtems_libio_iop_is_open( iop ) ) {
err = EBADF;
}
if (err != 0) {
errno = err;
ret = -1;
}

View File

@@ -43,8 +43,10 @@
void rtems_filesystem_location_free( rtems_filesystem_location_info_t *loc )
{
rtems_filesystem_instance_lock( loc );
(*loc->mt_entry->ops->freenod_h)( loc );
rtems_filesystem_instance_unlock( loc );
rtems_filesystem_location_remove_from_mt_entry( loc );
if ( loc->mt_entry != NULL ) {
rtems_filesystem_instance_lock( loc );
(*loc->mt_entry->ops->freenod_h)( loc );
rtems_filesystem_instance_unlock( loc );
rtems_filesystem_location_remove_from_mt_entry( loc );
}
}

View File

@@ -65,6 +65,10 @@ int fstat(
memset( sbuf, 0, sizeof(struct stat) );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
if (rv == 0 && !rtems_libio_iop_is_open( iop ) ) {
errno = EBADF;
rv = -1;
}
rtems_libio_iop_drop( iop );
return rv;
}

View File

@@ -77,7 +77,7 @@ static const rtems_assoc_t status_flags_assoc[] = {
{ 0, 0, 0 },
};
unsigned int rtems_libio_fcntl_flags( int fcntl_flags )
unsigned int rtems_libio_from_fcntl_flags( int fcntl_flags )
{
unsigned int flags = 0;
uint32_t access_modes;
@@ -136,6 +136,8 @@ rtems_libio_t *rtems_libio_allocate( void )
if ( iop != NULL ) {
void *next;
rtems_libio_iop_flags_clear( iop, LIBIO_FLAGS_FREE );
next = iop->data1;
rtems_libio_iop_free_head = next;
@@ -149,30 +151,32 @@ rtems_libio_t *rtems_libio_allocate( void )
return iop;
}
void rtems_libio_free(
void rtems_libio_free_iop(
rtems_libio_t *iop
)
{
size_t zero;
rtems_filesystem_location_free( &iop->pathinfo );
rtems_libio_lock();
/*
* Clear everything except the reference count part. At this point in time
* there may be still some holders of this file descriptor.
*/
rtems_libio_iop_flags_clear( iop, LIBIO_FLAGS_REFERENCE_INC - 1U );
zero = offsetof( rtems_libio_t, offset );
memset( (char *) iop + zero, 0, sizeof( *iop ) - zero );
if ( !rtems_libio_iop_is_free( iop ) ) {
/*
* Clear the flags. All references should have been dropped.
*/
_Atomic_Store_uint( &iop->flags, LIBIO_FLAGS_FREE, ATOMIC_ORDER_RELAXED );
/*
* Append it to the free list. This increases the likelihood that a use
* after close is detected.
*/
*rtems_libio_iop_free_tail = iop;
rtems_libio_iop_free_tail = &iop->data1;
rtems_filesystem_location_free( &iop->pathinfo );
zero = offsetof( rtems_libio_t, offset );
memset( (char *) iop + zero, 0, sizeof( *iop ) - zero );
/*
* Append it to the free list. This increases the likelihood that
* a use after close is detected.
*/
*rtems_libio_iop_free_tail = iop;
rtems_libio_iop_free_tail = &iop->data1;
}
rtems_libio_unlock();
}

View File

@@ -72,8 +72,10 @@ static void rtems_libio_init( void )
if (rtems_libio_number_iops > 0)
{
iop = rtems_libio_iop_free_head = &rtems_libio_iops[0];
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) {
rtems_libio_iop_flags_set( iop, LIBIO_FLAGS_FREE );
iop->data1 = iop + 1;
}
iop->data1 = NULL;
rtems_libio_iop_free_tail = &iop->data1;
}

View File

@@ -137,7 +137,7 @@ static int do_open(
rtems_filesystem_eval_path_extract_currentloc( &ctx, &iop->pathinfo );
rtems_filesystem_eval_path_cleanup( &ctx );
rtems_libio_iop_flags_set( iop, rtems_libio_fcntl_flags( oflag ) );
rtems_libio_iop_flags_set( iop, rtems_libio_from_fcntl_flags( oflag ) );
rv = (*iop->pathinfo.handlers->open_h)( iop, path, oflag, mode );
@@ -168,10 +168,6 @@ static int do_open(
}
}
if ( rv < 0 ) {
rtems_libio_free( iop );
}
return rv;
}
@@ -192,6 +188,9 @@ int open( const char *path, int oflag, ... )
iop = rtems_libio_allocate();
if ( iop != NULL ) {
rv = do_open( iop, path, oflag, mode );
if ( rv < 0 ) {
rtems_libio_free( iop );
}
} else {
errno = ENFILE;
rv = -1;

View File

@@ -47,14 +47,22 @@
*/
void rtems_libio_post_driver(void)
{
int fd = 0;
/*
* Attempt to open /dev/console.
*/
if ( open( CONSOLE_DEVICE_NAME, O_RDONLY, 0 ) != STDIN_FILENO ) {
if ( ( fd = open( CONSOLE_DEVICE_NAME, O_RDONLY, 0 ) ) != STDIN_FILENO ) {
/*
* There may not be a console driver so this is OK.
*/
return;
if ( fd < 0 ) {
return;
}
/*
* If open succeeds, but doesn't give us the stdin fileno we expect, bail out...
*/
_Internal_error( INTERNAL_ERROR_LIBIO_STDIN_FD_OPEN_FAILED );
}
/*

View File

@@ -53,11 +53,11 @@ const rtems_assoc_t rtems_termios_baud_table [] = {
{ "B1800", 1800, B1800 },
{ "B2400", 2400, B2400 },
{ "B4800", 4800, B4800 },
{ "B7200", 7200, B7200 },
{ "B9600", 9600, B9600 },
{ "B14400", 14400, B14400 },
{ "B19200", 19200, B19200 },
{ "B38400", 38400, B38400 },
{ "B7200", 7200, B7200 },
{ "B14400", 14400, B14400 },
{ "B28800", 28800, B28800 },
{ "B57600", 57600, B57600 },
{ "B76800", 76800, B76800 },

View File

@@ -51,6 +51,7 @@ extern char bsp_section_fast_text_end[];
#include <rtems/debugger/rtems-debugger-bsp.h>
#include "rtems-debugger-smp.h"
#include "rtems-debugger-target.h"
#include "rtems-debugger-threads.h"
@@ -58,155 +59,6 @@ extern char bsp_section_fast_text_end[];
#include <rtems/bspIo.h>
#endif
/*
* Structure used to manage a task executing a function on available cores on
* a scheduler.
*/
typedef struct {
rtems_id allCPUsBarrier;
rtems_task_entry work_function;
rtems_task_argument arg;
rtems_status_code sc;
} run_across_cpus_context;
/*
* The function that runs as the body of the task which moves itself among the
* various cores registered to a scheduler.
*/
static rtems_task run_across_cpus_task( rtems_task_argument arg )
{
uint32_t released = 0;
rtems_status_code sc;
run_across_cpus_context *ctx = (run_across_cpus_context *) arg;
cpu_set_t set;
cpu_set_t scheduler_set;
rtems_id scheduler_id;
sc = rtems_task_get_scheduler( RTEMS_SELF, &scheduler_id );
if ( sc != RTEMS_SUCCESSFUL ) {
ctx->sc = sc;
rtems_task_exit();
}
CPU_ZERO( &scheduler_set );
sc = rtems_scheduler_get_processor_set(
scheduler_id,
sizeof( scheduler_set ),
&scheduler_set
);
if ( sc != RTEMS_SUCCESSFUL ) {
ctx->sc = sc;
rtems_task_exit();
}
for (
int cpu_index = 0;
cpu_index < rtems_scheduler_get_processor_maximum();
cpu_index++
) {
if ( !CPU_ISSET( cpu_index, &scheduler_set ) ) {
continue;
}
CPU_ZERO( &set );
CPU_SET( cpu_index, &set );
sc = rtems_task_set_affinity( RTEMS_SELF, sizeof( set ), &set );
if ( sc != RTEMS_SUCCESSFUL ) {
ctx->sc = sc;
rtems_task_exit();
}
/* execute task on selected CPU */
ctx->work_function( ctx->arg );
}
sc = rtems_barrier_release( ctx->allCPUsBarrier, &released );
if ( sc != RTEMS_SUCCESSFUL ) {
ctx->sc = sc;
}
rtems_task_exit();
}
/*
* The function used to run a provided function with arbitrary argument across
* all cores registered to the current scheduler. This is similar to the Linux
* kernel's on_each_cpu() call and always waits for the task to complete before
* returning.
*/
static rtems_status_code run_across_cpus(
rtems_task_entry task_entry,
rtems_task_argument arg
)
{
rtems_status_code sc;
rtems_id Task_id;
run_across_cpus_context ctx;
ctx.work_function = task_entry;
ctx.arg = arg;
ctx.sc = RTEMS_SUCCESSFUL;
memset( &ctx.allCPUsBarrier, 0, sizeof( ctx.allCPUsBarrier ) );
sc = rtems_barrier_create(
rtems_build_name( 'B', 'c', 'p', 'u' ),
RTEMS_BARRIER_MANUAL_RELEASE,
2,
&ctx.allCPUsBarrier
);
if ( sc != RTEMS_SUCCESSFUL ) {
return sc;
}
sc = rtems_task_create(
rtems_build_name( 'T', 'c', 'p', 'u' ),
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES,
RTEMS_FLOATING_POINT | RTEMS_DEFAULT_ATTRIBUTES,
&Task_id
);
if ( sc != RTEMS_SUCCESSFUL ) {
rtems_barrier_delete( ctx.allCPUsBarrier );
return sc;
}
sc = rtems_task_start(
Task_id,
run_across_cpus_task,
( rtems_task_argument ) & ctx
);
if ( sc != RTEMS_SUCCESSFUL ) {
rtems_task_delete( Task_id );
rtems_barrier_delete( ctx.allCPUsBarrier );
return sc;
}
/* wait on task */
sc = rtems_barrier_wait( ctx.allCPUsBarrier, RTEMS_NO_TIMEOUT );
if ( sc != RTEMS_SUCCESSFUL ) {
rtems_task_delete( Task_id );
rtems_barrier_delete( ctx.allCPUsBarrier );
return sc;
}
rtems_barrier_delete( ctx.allCPUsBarrier );
if ( ctx.sc != RTEMS_SUCCESSFUL ) {
return ctx.sc;
}
return sc;
}
/*
* Number of registers.
*/
@@ -1338,7 +1190,7 @@ int rtems_debugger_target_enable( void )
aarch64_debug_break_clear();
#endif
aarch64_debug_disable_debug_exceptions();
sc = run_across_cpus(
sc = rtems_debugger_cpu_run_all(
setup_debugger_on_cpu,
( rtems_task_argument ) & init_error
);
@@ -1384,7 +1236,7 @@ int rtems_debugger_target_disable( void )
aarch64_debug_break_unload();
aarch64_debug_break_clear();
#endif
sc = run_across_cpus(
sc = rtems_debugger_cpu_run_all(
teardown_debugger_on_cpu,
( rtems_task_argument ) & deinit_error
);

View File

@@ -41,6 +41,7 @@
#include <rtems/debugger/rtems-debugger-bsp.h>
#include "rtems-debugger-smp.h"
#include "rtems-debugger-target.h"
#include "rtems-debugger-threads.h"
@@ -1977,16 +1978,29 @@ rtems_debugger_get_int_reg(rtems_debugger_thread* thread, size_t reg)
return value;
}
static rtems_task
rtems_debugger_setup_on_cpu(rtems_task_argument arg)
{
(void) arg;
rtems_debugger_target_set_mmu();
rtems_debugger_target_set_vectors();
}
int
rtems_debugger_target_enable(void)
{
rtems_interrupt_lock_context lock_context;
rtems_status_code sc;
rtems_status_code error = RTEMS_SUCCESSFUL;
arm_debug_break_unload();
arm_debug_break_clear_all();
rtems_interrupt_lock_acquire(&target_lock, &lock_context);
rtems_debugger_target_set_mmu();
rtems_debugger_target_set_vectors();
rtems_interrupt_lock_release(&target_lock, &lock_context);
sc = rtems_debugger_cpu_run_all(
rtems_debugger_setup_on_cpu, (rtems_task_argument) &error);
if (sc != RTEMS_SUCCESSFUL) {
return -1;
}
if (error != RTEMS_SUCCESSFUL) {
return -1;
}
debug_session_active = true;
return 0;
}

View File

@@ -33,6 +33,7 @@
#include <rtems/bspIo.h>
#include <rtems/score/smp.h>
#include <rtems/score/tls.h>
#include <rtems/rtems-debugger.h>
#include <rtems/debugger/rtems-debugger-server.h>
@@ -696,6 +697,25 @@ remote_packet_out_append_hex(const uint8_t* data, size_t size)
return 0;
}
/* output data in big-endian instead of little-endian */
static int
remote_packet_out_append_hex_be(const uint8_t* data, size_t size)
{
size_t ol = rtems_debugger->output_level;
size_t i = size;
while (i > 0) {
uint8_t byte = data[--i];
if (rtems_debugger->output_level >= (RTEMS_DEBUGGER_BUFFER_SIZE - 2)) {
rtems_debugger->output_level = ol;
rtems_debugger_printf("rtems-db: output overflow\n");
return -1;
}
rtems_debugger->output[rtems_debugger->output_level++] = hex_encode(byte >> 4);
rtems_debugger->output[rtems_debugger->output_level++] = hex_encode(byte);
}
return 0;
}
static int
remote_packet_out_append_str(const char* str)
{
@@ -1019,6 +1039,116 @@ remote_gq_attached(uint8_t* buffer, int size)
return 0;
}
static rtems_debugger_thread* get_debugger_thread_from_id(const char* thread_id)
{
int r;
DB_UINT pid = 0;
DB_UINT tid = 0;
bool extended;
rtems_debugger_threads* threads = rtems_debugger->threads;
rtems_debugger_thread* current;
extended = thread_id_decode(thread_id, &pid, &tid);
if (!extended && !check_pid(pid)) {
return NULL;
}
r = rtems_debugger_thread_find_index(tid);
if (r < 0) {
return NULL;
}
current = rtems_debugger_thread_current(threads);
return &current[r];
}
static int
parse_get_tls_addr(
uint8_t* buffer,
int size,
const char** thread_id_str,
const char** offset_str,
const char** lm_str
)
{
if (thread_id_str == NULL || offset_str == NULL || lm_str == NULL) {
return 1;
}
*thread_id_str = strchr((const char*) buffer, ':') + 1;
if (*thread_id_str == NULL || *thread_id_str - (char*)buffer > size) {
/* malformed packet */
return 1;
}
*offset_str = strchr(*thread_id_str, ',') + 1;
if (*offset_str == NULL || *offset_str - (char*)buffer > size) {
/* malformed packet */
return 1;
}
*lm_str = strchr(*offset_str, ',') + 1;
if (*lm_str == NULL || *lm_str - (char*)buffer > size) {
/* malformed packet */
return 1;
}
return 0;
}
static int
remote_gq_get_tls_addr(uint8_t* buffer, int size)
{
const char* thread_id_str;
const char* offset_str;
const char* lm_str;
uint64_t target_address;
int r;
rtems_debugger_thread* thread;
DB_UINT offset;
DB_UINT lm;
if (parse_get_tls_addr(buffer, size, &thread_id_str, &offset_str, &lm_str)) {
/* malformed packet */
remote_packet_out_str(r_E01);
remote_packet_out_send();
return 0;
}
offset = hex_decode_uint((const uint8_t*) offset_str);
lm = hex_decode_uint((const uint8_t*) lm_str);
if (lm != 0) {
/*
* TODO(kmoore) lm is the load module identifier. It is ignored and expected
* to be 0 until TLS support for dynamically loaded modules is added.
*/
remote_packet_out_str(r_E01);
remote_packet_out_send();
return 0;
}
thread = get_debugger_thread_from_id(thread_id_str);
if (thread == NULL) {
remote_packet_out_str(r_E01);
remote_packet_out_send();
return 0;
}
target_address =
(uintptr_t)_CPU_Get_TLS_thread_pointer(&thread->tcb->Registers);
target_address += sizeof(TLS_Thread_control_block) + offset;
remote_packet_out_reset();
r = remote_packet_out_append_hex_be((const uint8_t*) &target_address,
sizeof(target_address));
if (r < 0) {
remote_packet_out_str(r_E01);
}
remote_packet_out_send();
return 0;
}
static const rtems_debugger_packet general_query[] = {
{ .label = "qfThreadInfo",
.command = remote_gq_thread_info_first },
@@ -1032,6 +1162,8 @@ static const rtems_debugger_packet general_query[] = {
.command = remote_gq_attached },
{ .label = "qXfer",
.command = remote_gq_uninterpreted_transfer },
{ .label = "qGetTLSAddr",
.command = remote_gq_get_tls_addr },
};
#define REMOTE_GENERAL_QUERIES RTEMS_DEBUGGER_NUMOF(general_query)

View File

@@ -0,0 +1,175 @@
/*
* Copyright (c) 2021 Kinsey Moore
* Copyright (c) 2025 Chris Johns
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <rtems.h>
#include <rtems/score/cpu.h>
#include <rtems/score/threadimpl.h>
#include "rtems-debugger-smp.h"
#include "rtems-debugger-target.h"
#include "rtems-debugger-threads.h"
/*
* Structure used to manage a task executing a function on available
* cores on a scheduler.
*/
typedef struct {
rtems_id all_cpus_barrier;
rtems_task_entry worker;
rtems_task_argument arg;
rtems_status_code sc;
} rtems_debugger_cpu_run_context;
/*
* The function that runs as the body of the task which moves itself
* among the various cores registered to a scheduler.
*/
static rtems_task
rtems_debugger_cpu_run_body(rtems_task_argument arg)
{
uint32_t released = 0;
rtems_status_code sc;
rtems_debugger_cpu_run_context *ctx = (rtems_debugger_cpu_run_context *) arg;
cpu_set_t set;
cpu_set_t scheduler_set;
rtems_id scheduler_id;
sc = rtems_task_get_scheduler(RTEMS_SELF, &scheduler_id);
if (sc != RTEMS_SUCCESSFUL) {
ctx->sc = sc;
rtems_task_exit();
}
CPU_ZERO(&scheduler_set);
sc = rtems_scheduler_get_processor_set(
scheduler_id, sizeof(scheduler_set), &scheduler_set);
if (sc != RTEMS_SUCCESSFUL) {
ctx->sc = sc;
rtems_task_exit();
}
for (int cpu_index = 0;
cpu_index < rtems_scheduler_get_processor_maximum();
cpu_index++) {
if (!CPU_ISSET(cpu_index, &scheduler_set)) {
continue;
}
CPU_ZERO(&set);
CPU_SET(cpu_index, &set);
sc = rtems_task_set_affinity(RTEMS_SELF, sizeof(set), &set);
if (sc != RTEMS_SUCCESSFUL) {
ctx->sc = sc;
rtems_task_exit();
}
/* execute task on selected CPU */
ctx->worker(ctx->arg);
}
sc = rtems_barrier_release(ctx->all_cpus_barrier, &released);
if (sc != RTEMS_SUCCESSFUL) {
ctx->sc = sc;
}
rtems_task_exit();
}
/*
* The function used to run a provided function with arbitrary argument across
* all cores registered to the current scheduler. This is similar to the Linux
* kernel's on_each_cpu() call and always waits for the task to complete before
* returning.
*/
rtems_status_code
rtems_debugger_cpu_run_all(rtems_task_entry task_entry, rtems_task_argument arg)
{
rtems_status_code sc;
rtems_id task_id;
rtems_debugger_cpu_run_context ctx;
memset(&ctx, 0, sizeof(ctx));
ctx.worker = task_entry;
ctx.arg = arg;
ctx.sc = RTEMS_SUCCESSFUL;
sc = rtems_barrier_create(
rtems_build_name('D', 'B', 'b', 'r'), RTEMS_BARRIER_MANUAL_RELEASE, 2,
&ctx.all_cpus_barrier);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
sc = rtems_task_create(
rtems_build_name('D', 'B', 't', 'k'), 1, RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT | RTEMS_DEFAULT_ATTRIBUTES, &task_id);
if (sc != RTEMS_SUCCESSFUL) {
rtems_barrier_delete(ctx.all_cpus_barrier);
return sc;
}
sc = rtems_task_start(
task_id, rtems_debugger_cpu_run_body, (rtems_task_argument) &ctx);
if (sc != RTEMS_SUCCESSFUL) {
rtems_task_delete(task_id);
rtems_barrier_delete(ctx.all_cpus_barrier);
return sc;
}
/* wait on task */
sc = rtems_barrier_wait(ctx.all_cpus_barrier, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_task_delete(task_id);
rtems_barrier_delete(ctx.all_cpus_barrier);
return sc;
}
rtems_barrier_delete(ctx.all_cpus_barrier);
if (ctx.sc != RTEMS_SUCCESSFUL) {
return ctx.sc;
}
return sc;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2025 Chris Johns <chrisj@rtems.org>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Debugger for RTEMS.
*/
#ifndef _RTEMS_DEBUGGER_SMP_h
#define _RTEMS_DEBUGGER_SMP_h
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* The function used to run a provided function with arbitrary argument across
* all cores registered to the current scheduler. This is similar to the Linux
* kernel's on_each_cpu() call and always waits for the task to complete before
* returning.
*/
rtems_status_code rtems_debugger_cpu_run_all(
rtems_task_entry task_entry, rtems_task_argument arg);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@@ -601,14 +601,6 @@ rtems_debugger_target_exception_thread_resume(rtems_debugger_thread* thread)
}
}
int
rtems_debugger_target_start_memory_access(void)
{
rtems_debugger_target* target = rtems_debugger->target;
target->memory_access = true;
return setjmp(target->access_return);
}
void
rtems_debugger_target_end_memory_access(void)
{

View File

@@ -284,8 +284,20 @@ extern int rtems_debugger_target_cache_sync(rtems_debugger_target_swbreak* swbre
/**
* Start a target memory access. If 0 is return the access can proceed and if
* -1 is return the access has failed.
*
* The call to setjmp() must not reside inside a stack frame relative to the
* expected location of the possible failure. If the debugger is already
* executing in exception context and setjmp is called with its own stack frame,
* that stack frame will be released before the failure. The failure causes an
* exception which will continue using the same stack and is highly likely to
* overwrite stack information which is critical for the debugger to continue
* execution.
*/
extern int rtems_debugger_target_start_memory_access(void);
#define rtems_debugger_target_start_memory_access() \
({ \
rtems_debugger->target->memory_access = true, \
setjmp(rtems_debugger->target->access_return); \
})
/**
* End a target memory access.

View File

@@ -557,6 +557,8 @@ rtems_rtl_elf_relocate_worker (rtems_rtl_obj* obj,
resolved = rtems_rtl_elf_find_symbol (obj,
&sym, symname,
&symbol, &symvalue);
if (symname != NULL && strlen(symname) == 0)
resolved = true;
if (!handler (obj,
is_rela, relbuf, targetsect,

View File

@@ -315,6 +315,10 @@ rtems_rtl_elf_reloc_rel (rtems_rtl_obj* obj,
return rtems_rtl_elf_rel_failure;
}
/*
* Align tramp_brk as necessary.
*/
obj->tramp_brk = (void *)RTEMS_ALIGN_UP((uintptr_t)obj->tramp_brk, 4);
tramp_addr = ((Elf_Addr) obj->tramp_brk) | (symvalue & 1);
obj->tramp_brk = set_veneer(obj->tramp_brk, symvalue);
@@ -519,6 +523,10 @@ rtems_rtl_elf_reloc_rel (rtems_rtl_obj* obj,
return rtems_rtl_elf_rel_failure;
}
/*
* Align tramp_brk as necessary.
*/
obj->tramp_brk = (void *)RTEMS_ALIGN_UP((uintptr_t)obj->tramp_brk, 4);
tramp_addr = ((Elf_Addr) obj->tramp_brk) | (symvalue & 1);
tmp = tramp_addr + addend;
if (isThumb(symvalue)) {
@@ -526,11 +534,9 @@ rtems_rtl_elf_reloc_rel (rtems_rtl_obj* obj,
tmp = tmp - (Elf_Addr)where;
} else {
/*
* The B[L]X expects ARM code at the target. Align tramp_brk as
* necessary.
*/
obj->tramp_brk = (void *)RTEMS_ALIGN_UP((uintptr_t)obj->tramp_brk, 4);
tramp_addr = (Elf_Addr) obj->tramp_brk;
* The B[L]X expects ARM code at the target.
*/
tramp_addr = (Elf_Addr) obj->tramp_brk;
obj->tramp_brk = set_arm_veneer(obj->tramp_brk, symvalue);
/*
* where[1:0] are set to 0 for ARM-targeted relocations because the jump

View File

@@ -48,16 +48,6 @@
#include <rtems/rtl/rtl-sym.h>
#include <rtems/rtl/rtl-trace.h>
/**
* The single symbol forced into the global symbol table that is used to load a
* symbol table from an object file.
*/
static rtems_rtl_obj_sym global_sym_add =
{
.name = "rtems_rtl_base_sym_global_add",
.value = (void*) rtems_rtl_base_sym_global_add
};
static uint_fast32_t
rtems_rtl_symbol_hash (const char *s)
{
@@ -68,15 +58,6 @@ rtems_rtl_symbol_hash (const char *s)
return h & 0xffffffff;
}
static void
rtems_rtl_symbol_global_insert (rtems_rtl_symbols* symbols,
rtems_rtl_obj_sym* symbol)
{
uint_fast32_t hash = rtems_rtl_symbol_hash (symbol->name);
rtems_chain_append (&symbols->buckets[hash % symbols->nbuckets],
&symbol->node);
}
static const rtems_rtl_tls_offset*
rtems_rtl_symbol_find_tls_offset (size_t index,
const rtems_rtl_tls_offset* tls_offsets,
@@ -108,7 +89,6 @@ rtems_rtl_symbol_table_open (rtems_rtl_symbols* symbols,
symbols->nbuckets = buckets;
for (buckets = 0; buckets < symbols->nbuckets; ++buckets)
rtems_chain_initialize_empty (&symbols->buckets[buckets]);
rtems_rtl_symbol_global_insert (symbols, &global_sym_add);
return true;
}
@@ -118,6 +98,15 @@ rtems_rtl_symbol_table_close (rtems_rtl_symbols* symbols)
rtems_rtl_alloc_del (RTEMS_RTL_ALLOC_SYMBOL, symbols->buckets);
}
void
rtems_rtl_symbol_global_insert (rtems_rtl_symbols* symbols,
rtems_rtl_obj_sym* symbol)
{
uint_fast32_t hash = rtems_rtl_symbol_hash (symbol->name);
rtems_chain_append (&symbols->buckets[hash % symbols->nbuckets],
&symbol->node);
}
bool
rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,

View File

@@ -562,10 +562,18 @@ rtems_rtl_unresolved_add (rtems_rtl_obj* obj,
rtems_rtl_unresolv_block* block;
rtems_rtl_unresolv_rec* rec;
int name_index;
const int name_len = (int) strlen(name);
if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED))
printf ("rtl: unresolv: add: %s(s:%d) -> %s\n",
rtems_rtl_obj_oname (obj), sect, name);
printf ("rtl: unresolv: add: %s(s:%d) -> '%s' (len: %i)\n",
rtems_rtl_obj_oname (obj), sect, name, name_len);
/*
* No name or an empty name is not able to resolved?
*/
if (name_len == 0) {
return false;
}
unresolved = rtems_rtl_unresolved_unprotected ();
if (!unresolved)

View File

@@ -78,17 +78,47 @@
static rtems_rtl_data* rtl;
static bool rtl_data_init;
/**
* The single symbol forced into the global symbol table that is used to load a
* symbol table from an object file.
*/
static rtems_rtl_obj_sym default_global_syms =
{
.name = "rtems_rtl_base_sym_global_add",
.value = (void*) rtems_rtl_base_sym_global_add
};
/**
* Define a default base global symbol loader function that is weak
* so a real table can be linked in when the user wants one.
*
* The default init handler add the one symbol used when loading
* symbols with an object file. It is an unresolved external in that
* object file.
*/
void rtems_rtl_base_global_syms_init (void) __attribute__ ((weak));
void
rtems_rtl_base_global_syms_init (void)
{
/*
* Do nothing.
*/
rtems_rtl_symbols* symbols;
if (rtems_rtl_trace (RTEMS_RTL_TRACE_GLOBAL_SYM))
printf ("rtl: adding default global symbol\n");
if (!rtems_rtl_lock ())
{
rtems_rtl_set_error (EINVAL, "global add cannot lock rtl");
return;
}
symbols = rtems_rtl_global_symbols ();
rtl->base->global_table = &default_global_syms;
rtl->base->global_syms = 1;
rtems_rtl_symbol_global_insert (symbols, &default_global_syms);
rtems_rtl_unlock ();
}
static bool

View File

@@ -114,7 +114,7 @@ int rtems_jffs2_compressor_rtime_decompress(
positions[value]=outpos;
if (repeat) {
#ifdef __rtems__
if ((repeat + outpos) >= destlen) {
if ((repeat + outpos) > destlen) {
return 1;
}
#endif

View File

@@ -417,7 +417,17 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
A: Small enough that I don't care :)
*/
#ifndef __rtems__
return 0;
#else
/*
* Since RTEMS uses monolithic locking around JFFS2, returning 0
* here results in a livelock since no other progress will ever
* be made as some callers are in a tight loop with no relevant
* lock modification.
*/
return -EIO;
#endif
}
/* OK. Now if the inode is in state INO_STATE_GC, we are going to copy the

View File

@@ -801,9 +801,7 @@ rtems_capture_flush (bool prime)
_Thread_Iterate (rtems_capture_flush_tcb, NULL);
if (prime)
capture_flags_global &= ~(RTEMS_CAPTURE_TRIGGERED | RTEMS_CAPTURE_OVERFLOW);
else
capture_flags_global &= ~RTEMS_CAPTURE_OVERFLOW;
capture_flags_global &= ~RTEMS_CAPTURE_TRIGGERED;
for (cpu=0; cpu < rtems_scheduler_get_processor_maximum(); cpu++) {
RTEMS_INTERRUPT_LOCK_REFERENCE( lock, &(capture_lock_on_cpu( cpu )) )
@@ -811,6 +809,7 @@ rtems_capture_flush (bool prime)
rtems_interrupt_lock_acquire (lock, &lock_context_per_cpu);
capture_count_on_cpu(cpu) = 0;
capture_flags_on_cpu(cpu) &= ~RTEMS_CAPTURE_OVERFLOW;
if (capture_records_on_cpu(cpu).buffer)
rtems_capture_buffer_flush( &capture_records_on_cpu(cpu) );
rtems_interrupt_lock_release (lock, &lock_context_per_cpu);

View File

@@ -271,7 +271,7 @@ void rtems_aio_completed_list_op( listcb *listcbp )
case AIO_LIO_EVENT:
rtems_event_system_send(
listcbp->lio_notification.task_id,
RTEMS_EVENT_SYSTEM_AIO_LIST
RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED
);
break;
}
@@ -821,10 +821,3 @@ static void rtems_aio_handle_helper( rtems_aio_request *req )
}
}
void lio_notify_end_wait( union sigval attr ){
rtems_id id = attr.sival_int;
rtems_event_set event_in = RTEMS_EVENT_SYSTEM_AIO_LIST;
rtems_event_system_send( id, event_in );
}

View File

@@ -178,7 +178,7 @@ int lio_listio(
} else if ( mode == LIO_WAIT ) {
rtems_event_set event_out;
rtems_event_system_receive(
RTEMS_EVENT_SYSTEM_AIO_LIST,
RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED,
RTEMS_DEFAULT_OPTIONS,
RTEMS_NO_TIMEOUT,
&event_out

View File

@@ -301,6 +301,9 @@ int pthread_create(
the_attr->schedparam.sched_ss_max_repl;
if ( schedpolicy == SCHED_SPORADIC ) {
#if defined(RTEMS_SCORE_THREAD_HAS_SCHEDULER_CHANGE_INHIBITORS)
the_thread->is_scheduler_change_inhibited = true;
#endif
_POSIX_Threads_Sporadic_timer( &api->Sporadic.Timer );
}
#endif
@@ -348,7 +351,7 @@ void _POSIX_Threads_Sporadic_timer( Watchdog_Control *watchdog )
_Thread_queue_Context_clear_priority_updates( &queue_context );
_Thread_Wait_acquire( the_thread, &queue_context );
if ( _Priority_Node_is_active( &api->Sporadic.Low_priority ) ) {
if ( !_Priority_Node_is_active( &the_thread->Real_priority ) ) {
_Thread_Priority_add(
the_thread,
&the_thread->Real_priority,
@@ -359,7 +362,6 @@ void _POSIX_Threads_Sporadic_timer( Watchdog_Control *watchdog )
&api->Sporadic.Low_priority,
&queue_context
);
_Priority_Node_set_inactive( &api->Sporadic.Low_priority );
}
_Watchdog_Per_CPU_remove_ticks( &api->Sporadic.Timer );
@@ -388,7 +390,7 @@ static void _POSIX_Threads_Sporadic_budget_callout(
*/
the_thread->CPU_budget.available = UINT32_MAX;
if ( !_Priority_Node_is_active( &api->Sporadic.Low_priority ) ) {
if ( _Priority_Node_is_active( &the_thread->Real_priority ) ) {
_Thread_Priority_add(
the_thread,
&api->Sporadic.Low_priority,
@@ -399,6 +401,7 @@ static void _POSIX_Threads_Sporadic_budget_callout(
&the_thread->Real_priority,
&queue_context
);
_Priority_Node_set_inactive( &the_thread->Real_priority );
}
_Thread_Wait_release( the_thread, &queue_context );

View File

@@ -78,6 +78,10 @@ static int _POSIX_Set_sched_param(
return EINVAL;
}
#if defined(RTEMS_SCORE_THREAD_HAS_SCHEDULER_CHANGE_INHIBITORS)
the_thread->is_scheduler_change_inhibited = ( policy == SCHED_SPORADIC );
#endif
#if defined(RTEMS_POSIX_API)
if ( policy == SCHED_SPORADIC ) {
low_prio = param->sched_ss_low_priority;
@@ -98,7 +102,7 @@ static int _POSIX_Set_sched_param(
_Priority_Node_set_priority( &the_thread->Real_priority, core_normal_prio );
#if defined(RTEMS_POSIX_API)
if ( _Priority_Node_is_active( &api->Sporadic.Low_priority ) ) {
if ( !_Priority_Node_is_active( &the_thread->Real_priority ) ) {
_Thread_Priority_add(
the_thread,
&the_thread->Real_priority,
@@ -109,7 +113,6 @@ static int _POSIX_Set_sched_param(
&api->Sporadic.Low_priority,
queue_context
);
_Priority_Node_set_inactive( &api->Sporadic.Low_priority );
} else {
#endif
_Thread_Priority_changed(

View File

@@ -0,0 +1,68 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSImplClassicBarrier
*
* @brief This source file contains the implementation of
* rtems_barrier_get_number_waiting().
*/
/*
* Copyright (C) 2025 Mazen Adel Elmessady
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/rtems/barrierimpl.h>
rtems_status_code rtems_barrier_get_number_waiting(
rtems_id id,
uint32_t *waiting
)
{
Barrier_Control *the_barrier;
Thread_queue_Context queue_context;
if ( waiting == NULL ) {
return RTEMS_INVALID_ADDRESS;
}
the_barrier = _Barrier_Get( id, &queue_context );
if ( the_barrier == NULL ) {
return RTEMS_INVALID_ID;
}
_CORE_barrier_Acquire_critical( &the_barrier->Barrier, &queue_context );
*waiting = _CORE_barrier_Get_number_waiting( &the_barrier->Barrier );
_CORE_barrier_Release( &the_barrier->Barrier, &queue_context );
return RTEMS_SUCCESSFUL;
}

View File

@@ -86,7 +86,8 @@ static const char *const internal_error_text[] = {
"INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED",
"INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED",
"INTERNAL_ERROR_NO_MEMORY_FOR_IDLE_TASK_STORAGE",
"INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL"
"INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL",
"INTERNAL_ERROR_LIBIO_STDIN_FD_OPEN_FAILED"
};
const char *rtems_internal_error_text( rtems_fatal_code error )

View File

@@ -45,6 +45,8 @@ extern "C" {
#include <rtems/score/riscv.h>
#define RISCV_MSTATUS_MIE 0x8
#define RISCV_MSTATUS_MDT 0x40000000000
#define RISCV_MSTATUSH_MDT 0x400
#define CPU_ISR_PASSES_FRAME_POINTER FALSE

View File

@@ -106,6 +106,20 @@ SYM(_RISCV_Exception_handler):
/* Check if this is a synchronous or interrupt exception */
bgez a0, .Lsynchronous_exception
/*
* Interrupt exception, clear MDT bit.
* This is only necessary if the Smdbltrp extension is implemented.
* In that case not clearing the MDT bit would prevent us from setting
* the MIE bit later.
*/
#if __riscv_xlen == 64
li t0, RISCV_MSTATUS_MDT
csrrc zero, mstatus, t0
#elif __riscv_xlen == 32
li t0, RISCV_MSTATUSH_MDT
csrrc zero, mstatush, t0
#endif
/* Increment interrupt nest and thread dispatch disable level */
lw t0, PER_CPU_ISR_NEST_LEVEL(s0)
lw t1, PER_CPU_THREAD_DISPATCH_DISABLE_LEVEL(s0)
@@ -185,7 +199,6 @@ SYM(_RISCV_Exception_handler):
/* Restore */
LREG a0, RISCV_INTERRUPT_FRAME_MSTATUS(sp)
LREG a1, RISCV_INTERRUPT_FRAME_MEPC(sp)
LREG a2, RISCV_INTERRUPT_FRAME_A2(sp)
LREG s0, RISCV_INTERRUPT_FRAME_S0(sp)
LREG s1, RISCV_INTERRUPT_FRAME_S1(sp)
LREG ra, RISCV_INTERRUPT_FRAME_RA(sp)
@@ -201,6 +214,20 @@ SYM(_RISCV_Exception_handler):
LREG t4, RISCV_INTERRUPT_FRAME_T4(sp)
LREG t5, RISCV_INTERRUPT_FRAME_T5(sp)
LREG t6, RISCV_INTERRUPT_FRAME_T6(sp)
/*
* Clear MDT bit before restoring mstatus register.
* This is only necessary if the Smdbltrp extension is implemented.
* In that case, writing to mstatus with MDT set would clear the MIE
* bit, regardless of the MIE value written.
* On RV32, the MDT bit is in the mstatush CSR which is not restored.
*/
#if __riscv_xlen == 64
li a2, RISCV_MSTATUS_MDT
not a2, a2
and a0, a0, a2
#endif
csrw mstatus, a0
csrw mepc, a1
#if __riscv_flen > 0
@@ -229,6 +256,7 @@ SYM(_RISCV_Exception_handler):
#endif
LREG a0, RISCV_INTERRUPT_FRAME_A0(sp)
LREG a1, RISCV_INTERRUPT_FRAME_A1(sp)
LREG a2, RISCV_INTERRUPT_FRAME_A2(sp)
addi sp, sp, CPU_INTERRUPT_FRAME_SIZE

View File

@@ -68,7 +68,7 @@ void _Thread_queue_Do_nothing_priority_actions(
Priority_Actions *priority_actions
)
{
#if defined(RTEMS_DEBUG)
#if defined(RTEMS_DEBUG) && defined(RTEMS_SMP)
Priority_Aggregation *priority_aggregation;
priority_aggregation = _Priority_Actions_move( priority_actions );

View File

@@ -54,6 +54,8 @@ links:
uid: ../../objdevspizynq
- role: build-dependency
uid: ../../objdevspixil
- role: build-dependency
uid: ../../objxqspiflash
- role: build-dependency
uid: ../../objmem
- role: build-dependency

View File

@@ -9,12 +9,12 @@ content: |
#
RTEMS_API = ${__RTEMS_MAJOR__}
RTEMS_CPU = ${ARCH}
RTEMS_BSP = ${BSP_NAME}
RTEMS_ROOT ?= ${PREFIX}
prefix = ${PREFIX}
exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
prefix = $$(RTEMS_ROOT)
exec_prefix = $$(prefix)/$$(RTEMS_CPU)-rtems$$(RTEMS_API)
CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++
@@ -43,7 +43,6 @@ content: |
export SIZE
export OBJCOPY
RTEMS_ROOT ?= $$(prefix)
PROJECT_ROOT = $$(RTEMS_ROOT)
RTEMS_CUSTOM = $$(RTEMS_ROOT)/make/custom/$$(RTEMS_BSP).cfg
RTEMS_SHARE = $$(RTEMS_ROOT)/share/rtems$$(RTEMS_API)

View File

@@ -16,6 +16,7 @@ install:
- bsps/include/grlib/ambapp_bus_grlib.h
- bsps/include/grlib/ambapp_ids.h
- bsps/include/grlib/apbuart.h
- bsps/include/grlib/apbuart-regs.h
- bsps/include/grlib/apbuart_cons.h
- bsps/include/grlib/apbuart_termios.h
- bsps/include/grlib/b1553brm.h
@@ -28,6 +29,7 @@ install:
- bsps/include/grlib/genirq.h
- bsps/include/grlib/gpiolib.h
- bsps/include/grlib/gptimer.h
- bsps/include/grlib/gptimer-regs.h
- bsps/include/grlib/gr1553b.h
- bsps/include/grlib/gr1553bc.h
- bsps/include/grlib/gr1553bc_list.h
@@ -59,6 +61,7 @@ install:
- bsps/include/grlib/grtc.h
- bsps/include/grlib/grtm.h
- bsps/include/grlib/i2cmst.h
- bsps/include/grlib/irqamp-regs.h
- bsps/include/grlib/l2c.h
- bsps/include/grlib/l4stat.h
- bsps/include/grlib/mctrl.h

Some files were not shown because too many files have changed in this diff Show More