fix CpuControl::start_app_core signature (#466)

This commit is contained in:
dimpolo 2023-04-05 17:37:22 +02:00 committed by GitHub
parent 7ab9d91f26
commit 8815e75250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -187,10 +187,10 @@ impl CpuControl {
/// The second core will start running the closure `entry`.
///
/// Dropping the returned guard will park the core.
pub fn start_app_core(
pub fn start_app_core<'a>(
&mut self,
entry: &mut (dyn FnMut() + Send),
) -> Result<AppCoreGuard, Error> {
entry: &'a mut (dyn FnMut() + Send),
) -> Result<AppCoreGuard<'a>, Error> {
let dport_control = crate::peripherals::DPORT::PTR;
let dport_control = unsafe { &*dport_control };

View File

@ -122,10 +122,10 @@ impl CpuControl {
/// The second core will start running the closure `entry`.
///
/// Dropping the returned guard will park the core.
pub fn start_app_core(
pub fn start_app_core<'a>(
&mut self,
entry: &mut (dyn FnMut() + Send),
) -> Result<AppCoreGuard, Error> {
entry: &'a mut (dyn FnMut() + Send),
) -> Result<AppCoreGuard<'a>, Error> {
let system_control = crate::peripherals::SYSTEM::PTR;
let system_control = unsafe { &*system_control };