Skip to content

Commit 134f34d

Browse files
monitor: lazy Scheduling Context rebind
Applied seL4/seL4#523 to workaround seL4/seL4#1617 Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
1 parent da0ca91 commit 134f34d

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

monitor/src/main.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -732,19 +732,13 @@ static void monitor(void)
732732
seL4_Word tcb_cap = BASE_PD_TCB_CAP + pd_id;
733733

734734
if (label == seL4_Fault_NullFault && pd_id < MAX_PDS) {
735-
/* This is a request from our PD to become passive */
736-
err = seL4_SchedContext_UnbindObject(BASE_SCHED_CONTEXT_CAP + pd_id, tcb_cap);
735+
err = seL4_SchedContext_Bind(BASE_SCHED_CONTEXT_CAP + pd_id, BASE_NOTIFICATION_CAP + pd_id);
737736
if (err != seL4_NoError) {
738-
puts("MON|ERROR: could not unbind scheduling context from thread control block\n");
737+
puts("MON|ERROR: could not bind scheduling context to notification object\n");
739738
} else {
740-
err = seL4_SchedContext_Bind(BASE_SCHED_CONTEXT_CAP + pd_id, BASE_NOTIFICATION_CAP + pd_id);
741-
if (err != seL4_NoError) {
742-
puts("MON|ERROR: could not bind scheduling context to notification object\n");
743-
} else {
744-
puts("MON|INFO: PD '");
745-
puts(pd_names[pd_id]);
746-
puts("' is now passive!\n");
747-
}
739+
puts("MON|INFO: PD '");
740+
puts(pd_names[pd_id]);
741+
puts("' is now passive!\n");
748742
}
749743

750744
continue;

0 commit comments

Comments
 (0)