libkernel: CpuOps: add 'static trait bound

The CpuOps trait should never hold a reference to any other object. In
fact, it should be a singleton object which is constructed at kernel
boot and live for the entire lifetime of the system. Therefore, it's
safe to add the `'static` trait bound.
This commit is contained in:
Matthew Leach
2025-12-11 22:29:49 +00:00
committed by Ashwin Naren
parent 5c8793675d
commit ba7848fc8b

View File

@@ -21,7 +21,7 @@ pub mod sync;
extern crate alloc;
pub trait CpuOps {
pub trait CpuOps: 'static {
/// Returns the ID of the currently executing core.
fn id() -> usize;