mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 04:13:24 +00:00
Print who and on which CPU the kernel panics
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
c1fd09fd41
commit
25a918d132
@ -26,6 +26,7 @@ use crate::{prelude::*, user::UserSpace};
|
||||
/// Each task is associated with per-task data and an optional user space.
|
||||
/// If having a user space, the task can switch to the user space to
|
||||
/// execute user code. Multiple tasks can share a single user space.
|
||||
#[derive(Debug)]
|
||||
pub struct Task {
|
||||
func: SyncUnsafeCell<Option<Box<dyn FnOnce() + Send + Sync>>>,
|
||||
data: Box<dyn Any + Send + Sync>,
|
||||
|
@ -14,12 +14,14 @@ use crate::{cpu::CpuId, task::Task};
|
||||
/// define them, such as
|
||||
/// [existential types](https://github.com/rust-lang/rfcs/pull/2492) do not
|
||||
/// exist yet. So we decide to define them in OSTD.
|
||||
#[derive(Debug)]
|
||||
pub struct TaskScheduleInfo {
|
||||
/// The CPU that the task would like to be running on.
|
||||
pub cpu: AtomicCpuId,
|
||||
}
|
||||
|
||||
/// An atomic CPUID container.
|
||||
#[derive(Debug)]
|
||||
pub struct AtomicCpuId(AtomicU32);
|
||||
|
||||
impl AtomicCpuId {
|
||||
|
Reference in New Issue
Block a user