Skip to content

Commit

Permalink
deobjectification.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Nov 17, 2019
1 parent 52f4871 commit 71c6e53
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tock/kernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,7 @@ use crate::syscall::{self, Syscall, UserspaceKernelBoundary};
use crate::tbfheader;
use core::cmp::max;

pub fn load_processes<C: Chip>(chip: &'static C) { unsafe { Process::create(chip); } }
pub fn load_processes<C: Chip>(_: &'static C) { unsafe { process_create::<C>(); } }

pub trait ProcessType {
unsafe fn process_detail_fmt(&self, writer: &mut dyn Write) { loop { } }
Expand Down Expand Up @@ -2684,15 +2684,8 @@ impl<C: Chip> ProcessType for Process<'a, C> {

fn exceeded_check(size: usize, allocated: usize) -> &'static str { loop { } }

impl<C: 'static + Chip> Process<'a, C> {
#[allow(clippy::cast_ptr_alignment)]
crate unsafe fn create(
chip: &'static C,
) -> &'static dyn ProcessType {
let mut process: &mut Process<C> = None.unwrap();

process
}
fn process_create<C: 'static + Chip>() {
let _: &'static dyn ProcessType = None::<&mut Process<C>>.unwrap();
}

impl<C: 'static + Chip> Process<'a, C> {
Expand Down

0 comments on commit 71c6e53

Please sign in to comment.