detect "not scheduled" faster (#3200)
* fatal if not found * handle not-scheduled Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
0c6297e926
commit
da5aaeda2b
|
@ -77,6 +77,11 @@ void EventQueue::remove(scheduling_s* scheduling) {
|
||||||
assertListIsSorted();
|
assertListIsSorted();
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
||||||
|
// Special case: event isn't scheduled, so don't cancel it
|
||||||
|
if (!scheduling->action) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Special case: empty list, nothing to do
|
// Special case: empty list, nothing to do
|
||||||
if (!head) {
|
if (!head) {
|
||||||
return;
|
return;
|
||||||
|
@ -97,8 +102,9 @@ void EventQueue::remove(scheduling_s* scheduling) {
|
||||||
current = current->nextScheduling_s;
|
current = current->nextScheduling_s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Walked off the end, not present, nothing more to do
|
// Walked off the end, this is an error since this *should* have been scheduled
|
||||||
if (!current) {
|
if (!current) {
|
||||||
|
firmwareError(OBD_PCM_Processor_Fault, "EventQueue::remove didn't find element");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue