|
582 | 582 | //! |
583 | 583 | //! Skips disabling interrupts (to support chips without XIE/XIP CSRs). |
584 | 584 | //! |
585 | | -//! ## `no-interrupts` |
| 585 | +//! ## `custom-interrupts` |
586 | 586 | //! |
587 | 587 | //! Opts out of the default implementation for `_dispatch_core_interrupt` to support platforms |
588 | 588 | //! with custom core interrupt sources. |
589 | 589 | //! |
590 | | -//! ## `no-exceptions` |
| 590 | +//! ## `custom-exceptions` |
591 | 591 | //! |
592 | 592 | //! Opts out of the default implementation for `_dispatch_exception` to support platforms |
593 | 593 | //! with custom exception sources. |
|
683 | 683 | #![no_std] |
684 | 684 | #![deny(missing_docs)] |
685 | 685 |
|
| 686 | +/// Backwards-compatibility deprecation warnings for renamed feature `no-interrupts`. |
| 687 | +/// If a user enables the old feature, emit a warning pointing them to the new `custom-interrupts`. |
| 688 | +#[cfg(feature = "no-interrupts")] |
| 689 | +#[deprecated(note = "feature `no-interrupts` is deprecated; use `custom-interrupts` instead")] |
| 690 | +pub const __RISCV_RT_DEPRECATED_NO_INTERRUPTS: () = (); |
| 691 | + |
| 692 | +#[cfg(feature = "no-interrupts")] |
| 693 | +#[allow(clippy::let_unit_value)] |
| 694 | +const _: () = { |
| 695 | + let _ = __RISCV_RT_DEPRECATED_NO_INTERRUPTS; |
| 696 | +}; |
| 697 | + |
| 698 | +/// Backwards-compatibility deprecation warnings for renamed feature `no-exceptions`. |
| 699 | +/// If a user enables the old feature, emit a warning pointing them to the new `custom-exceptions`. |
| 700 | +#[cfg(feature = "no-exceptions")] |
| 701 | +#[deprecated(note = "feature `no-exceptions` is deprecated; use `custom-exceptions` instead")] |
| 702 | +pub const __RISCV_RT_DEPRECATED_NO_EXCEPTIONS: () = (); |
| 703 | + |
| 704 | +#[cfg(feature = "no-exceptions")] |
| 705 | +#[allow(clippy::let_unit_value)] |
| 706 | +const _: () = { |
| 707 | + let _ = __RISCV_RT_DEPRECATED_NO_EXCEPTIONS; |
| 708 | +}; |
| 709 | + |
686 | 710 | #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] |
687 | 711 | mod asm; |
688 | 712 |
|
689 | | -#[cfg(not(feature = "no-exceptions"))] |
| 713 | +#[cfg(not(feature = "custom-exceptions"))] |
690 | 714 | pub mod exceptions; |
691 | 715 |
|
692 | | -#[cfg(not(feature = "no-interrupts"))] |
| 716 | +#[cfg(not(feature = "custom-interrupts"))] |
693 | 717 | pub mod interrupts; |
694 | 718 |
|
695 | 719 | #[cfg(feature = "s-mode")] |
@@ -838,13 +862,13 @@ pub struct TrapFrame { |
838 | 862 | /// Targets that comply with the RISC-V standard can use the implementation provided |
839 | 863 | /// by this crate in the [`exceptions`] module. Targets with special exception sources |
840 | 864 | /// may provide their custom implementation of the `_dispatch_exception` function. You may |
841 | | -/// also need to enable the `no-exceptions` feature to op-out the default implementation. |
| 865 | +/// also need to enable the `custom-exceptions` feature to op-out the default implementation. |
842 | 866 | /// |
843 | 867 | /// In direct mode (i.e., `v-trap` feature disabled), interrupt dispatching is performed |
844 | 868 | /// by an extern `_dispatch_core_interrupt` function. Targets that comply with the RISC-V |
845 | 869 | /// standard can use the implementation provided by this crate in the [`interrupts`] module. |
846 | 870 | /// Targets with special interrupt sources may provide their custom implementation of the |
847 | | -/// `_dispatch_core_interrupt` function. You may also need to enable the `no-interrupts` |
| 871 | +/// `_dispatch_core_interrupt` function. You may also need to enable the `custom-interrupts` |
848 | 872 | /// feature to op-out the default implementation. |
849 | 873 | /// |
850 | 874 | /// In vectored mode (i.e., `v-trap` feature enabled), interrupt dispatching is performed |
|
0 commit comments