Author: kevans
Date: Thu Oct 24 02:22:52 2019
New Revision: 353968
URL: https://svnweb.freebsd.org/changeset/base/353968

Log:
  MFC r339796: Simplify the EFI delay() function by calling BS->Stall()

Modified:
  stable/12/stand/efi/libefi/delay.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/efi/libefi/delay.c
==============================================================================
--- stable/12/stand/efi/libefi/delay.c  Wed Oct 23 23:20:49 2019        
(r353967)
+++ stable/12/stand/efi/libefi/delay.c  Thu Oct 24 02:22:52 2019        
(r353968)
@@ -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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to