Skip to content

Commit

Permalink
fix another bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhiyuanSue committed Dec 19, 2024
1 parent 33465c7 commit 7fbfac6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn decode_sched_context_invocation(
capability: &cap_sched_context_cap,
buffer: &seL4_IPCBuffer,
) -> exception_t {
// println!("go into decode sched context invocation");
// sel4_common::println!("go into decode sched context invocation");
let sc = convert_to_mut_type_ref::<sched_context_t>(capability.get_capSCPtr() as usize);
match inv_label {
MessageLabel::SchedContextConsumed => {
Expand Down
14 changes: 8 additions & 6 deletions sel4_ipc/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,15 @@ impl endpoint_func for endpoint {
sender.do_ipc_transfer(thread, Some(self), badge, can_grant);
let do_call = sender.tcbState.get_blockingIPCIsCall() != 0;
// MCS
if convert_to_mut_type_ref::<sched_context_t>(sender.tcbSchedContext).sc_sporadic()
if let Some(sc) =
convert_to_option_mut_type_ref::<sched_context_t>(sender.tcbSchedContext)
{
unsafe {
assert!(sender.tcbSchedContext != ksCurSC);
if sender.tcbSchedContext != ksCurSC {
convert_to_mut_type_ref::<sched_context_t>(sender.tcbSchedContext)
.refill_unblock_check();
if sc.sc_sporadic() {
unsafe {
assert!(sender.tcbSchedContext != ksCurSC);
if sender.tcbSchedContext != ksCurSC {
sc.refill_unblock_check();
}
}
}
}
Expand Down

0 comments on commit 7fbfac6

Please sign in to comment.