Compare commits
2
Commits
9199c60948
...
bc0c885052
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc0c885052 | ||
|
|
268b36188e |
@@ -1,3 +1,17 @@
|
|||||||
|
use alloc::alloc::{alloc, dealloc, Layout};
|
||||||
|
|
||||||
|
const STACK_SIZE: usize = 4096 * 20;
|
||||||
|
|
||||||
pub struct Thread {
|
pub struct Thread {
|
||||||
rsp: u64
|
rsp: u64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Thread {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
unsafe {
|
||||||
|
Thread {
|
||||||
|
rsp: alloc(Layout::new::<[u8; STACK_SIZE]>()) as u64,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||