svn commit: r339796 - head/stand/efi/libefi

Rebecca Cran bcran at FreeBSD.org
Fri Oct 26 21:57:23 UTC 2018


Author: bcran
Date: Fri Oct 26 21:57:22 2018
New Revision: 339796
URL: https://svnweb.freebsd.org/changeset/base/339796

Log:
  Simplify the EFI delay() function by calling BS->Stall()
  
  Differential Revision: https://reviews.freebsd.org/D16753

Modified:
  head/stand/efi/libefi/delay.c

Modified: head/stand/efi/libefi/delay.c
==============================================================================
--- head/stand/efi/libefi/delay.c	Fri Oct 26 21:20:04 2018	(r339795)
+++ head/stand/efi/libefi/delay.c	Fri Oct 26 21:57:22 2018	(r339796)
@@ -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);
 }


More information about the svn-src-head mailing list