Skip to content

Commit 3664106

Browse files
dreamliner787-9Ivan-Velickovic
authored andcommitted
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 3664106

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

monitor/src/main.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -733,18 +733,13 @@ static void monitor(void)
733733

734734
if (label == seL4_Fault_NullFault && pd_id < MAX_PDS) {
735735
/* This is a request from our PD to become passive */
736-
err = seL4_SchedContext_UnbindObject(BASE_SCHED_CONTEXT_CAP + pd_id, tcb_cap);
736+
err = seL4_SchedContext_Bind(BASE_SCHED_CONTEXT_CAP + pd_id, BASE_NOTIFICATION_CAP + pd_id);
737737
if (err != seL4_NoError) {
738-
puts("MON|ERROR: could not unbind scheduling context from thread control block\n");
738+
puts("MON|ERROR: could not bind scheduling context to notification object\n");
739739
} 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-
}
740+
puts("MON|INFO: PD '");
741+
puts(pd_names[pd_id]);
742+
puts("' is now passive!\n");
748743
}
749744

750745
continue;

0 commit comments

Comments
 (0)