forked from M-Labs/libfringe
rename platform to os
This commit is contained in:
parent
5ae54da9c2
commit
27318bc271
|
@ -1,17 +1,18 @@
|
||||||
use core::prelude::*;
|
use core::prelude::*;
|
||||||
use stack::StackSource;
|
use stack::StackSource;
|
||||||
use arch::Registers;
|
use arch::Registers;
|
||||||
use platform;
|
use stack::Stack;
|
||||||
|
use os;
|
||||||
|
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
regs: Registers,
|
regs: Registers,
|
||||||
_stack: platform::Stack
|
_stack: os::Stack
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Context {
|
impl Context {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn new<F>(f: F) -> Context where F: FnOnce() + Send + 'static {
|
pub unsafe fn new<F>(f: F) -> Context where F: FnOnce() + Send + 'static {
|
||||||
let mut stack = platform::StackSource::get_stack(4 << 20);
|
let mut stack = os::StackSource::get_stack(4 << 20);
|
||||||
let regs = Registers::new(&mut stack, f);
|
let regs = Registers::new(&mut stack, f);
|
||||||
Context {
|
Context {
|
||||||
regs: regs,
|
regs: regs,
|
||||||
|
|
|
@ -20,4 +20,4 @@ pub mod context;
|
||||||
pub mod stack;
|
pub mod stack;
|
||||||
|
|
||||||
mod arch;
|
mod arch;
|
||||||
mod platform;
|
mod os;
|
||||||
|
|
Loading…
Reference in New Issue