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

Differential Revision: https://reviews.freebsd.org/D16753
This commit is contained in:
bcran 2018-10-26 21:57:22 +00:00
parent 6fdcb3210a
commit 7856c3ee08

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);
}