Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2018 21:57:22 +0000 (UTC)
From:      Rebecca Cran <bcran@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339796 - head/stand/efi/libefi
Message-ID:  <201810262157.w9QLvMow019092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810262157.w9QLvMow019092>