Simplify the EFI delay() function by calling BS->Stall()

Differential Revision: https://reviews.freebsd.org/D16753
This commit is contained in:
Rebecca Cran 2018-10-26 21:57:22 +00:00
parent 36847545b5
commit 9a815e0a58

View File

@ -33,15 +33,5 @@ __FBSDID("$FreeBSD$");
void
delay(int usecs)
{
static EFI_EVENT ev = 0;
UINTN junk;
if (!ev) {
if (BS->CreateEvent(EVT_TIMER, TPL_APPLICATION, 0, 0, &ev)
!= EFI_SUCCESS)
return;
}
BS->SetTimer(ev, TimerRelative, usecs * 10);
BS->WaitForEvent(1, &ev, &junk);
BS->Stall(usecs);
}