Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2019 02:22:52 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r353968 - stable/12/stand/efi/libefi
Message-ID:  <201910240222.x9O2MqZf081129@repo.freebsd.org>

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



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