-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cafd486
commit 36927fd
Showing
11 changed files
with
157 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use sel4_common::structures_gen::call_stack; | ||
|
||
use crate::{set_thread_state, tcb_t, ThreadState}; | ||
|
||
pub type reply_t = reply; | ||
#[repr(C)] | ||
#[derive(Debug, Clone)] | ||
// TODO: MCS | ||
pub struct reply { | ||
/// TCB pointed to by this reply object | ||
pub replyTCB: usize, | ||
pub replyPrev: call_stack, | ||
pub replyNext: call_stack, | ||
pub padding: usize, | ||
} | ||
impl reply { | ||
pub fn get_ptr(&mut self) -> usize { | ||
self as *const _ as usize | ||
} | ||
pub fn unlink(&mut self, tcb: &mut tcb_t) { | ||
assert!(self.replyTCB == tcb.get_ptr()); | ||
assert!(tcb.tcbState.get_replyObject() as usize == self.get_ptr()); | ||
tcb.tcbState.set_replyObject(0); | ||
self.replyTCB = 0; | ||
set_thread_state(tcb, ThreadState::ThreadStateInactive); | ||
} | ||
pub fn push(&mut self, tcb_caller: &mut tcb_t, tcb_callee: &mut tcb_t, canDonate: bool) { | ||
// TODO: MCS | ||
} | ||
pub fn pop(&mut self, tcb: &mut tcb_t) { | ||
// TODO: MCS | ||
} | ||
pub fn remove(&mut self, tcb: &mut tcb_t) { | ||
// TODO: MCS | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.