Skip to content
Snippets Groups Projects
Commit 8eef8362 authored by Martin Kröning's avatar Martin Kröning :crab:
Browse files

TaskHandle: Feature-gate core_id

parent cff074ea
No related branches found
No related tags found
No related merge requests found
......@@ -268,6 +268,7 @@ impl PerCoreScheduler {
TaskHandle::new(
current_task_borrowed.id,
current_task_borrowed.prio,
#[cfg(feature = "smp")]
current_task_borrowed.core_id,
)
})
......
......@@ -89,18 +89,21 @@ pub const NO_PRIORITIES: usize = 31;
pub struct TaskHandle {
id: TaskId,
priority: Priority,
#[cfg(feature = "smp")]
core_id: CoreId,
}
impl TaskHandle {
pub fn new(id: TaskId, priority: Priority, core_id: CoreId) -> Self {
pub fn new(id: TaskId, priority: Priority, #[cfg(feature = "smp")] core_id: CoreId) -> Self {
Self {
id,
priority,
#[cfg(feature = "smp")]
core_id,
}
}
#[cfg(feature = "smp")]
pub fn get_core_id(&self) -> CoreId {
self.core_id
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment