Skip to content

Commit

Permalink
Merge pull request #183 from rust-embedded/fix-nightly-build
Browse files Browse the repository at this point in the history
`riscv-rt`: Fix nightly builds
  • Loading branch information
romancardenas authored Feb 14, 2024
2 parents ddf131f + 146258b commit ac437cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions riscv-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

- Implementation of `default_mp_hook` when `single-hart` feature is enabled.

## [v0.12.1] - 2024-01-24

### Added
Expand Down
6 changes: 5 additions & 1 deletion riscv-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,14 @@ pub static __INTERRUPTS: [Option<unsafe extern "C" fn()>; 12] = [
pub extern "Rust" fn default_pre_init() {}

/// Default implementation of `_mp_hook` wakes hart 0 and busy-loops all the other harts.
/// Users can override this function by defining their own `_mp_hook`.
///
/// # Note
///
/// If the `single-hart` feature is enabled, `_mp_hook` is not called.
#[doc(hidden)]
#[no_mangle]
#[rustfmt::skip]
#[cfg(not(feature = "single-hart"))]
pub extern "Rust" fn default_mp_hook(hartid: usize) -> bool {
match hartid {
0 => true,
Expand Down

0 comments on commit ac437cb

Please sign in to comment.