Skip to content
Permalink
Browse files

deobjectification.

  • Loading branch information
pnkfelix committed Nov 17, 2019
1 parent 52f4871 commit 71c6e538854171b043b7628b15e4fe4f23a056a8
Showing with 3 additions and 10 deletions.
  1. +3 −10 tock/kernel/src/lib.rs
@@ -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 { } }
@@ -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> {

0 comments on commit 71c6e53

Please sign in to comment.
You can’t perform that action at this time.