mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 22:47:55 -05:00
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:
committed by
Ashwin Naren
parent
5c8793675d
commit
ba7848fc8b
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user