From owner-svn-src-head@freebsd.org Fri Oct 26 21:57:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BFE510C9288; Fri, 26 Oct 2018 21:57:23 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6A936CBD7; Fri, 26 Oct 2018 21:57:22 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A24BB26BF1; Fri, 26 Oct 2018 21:57:22 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9QLvMwm019093; Fri, 26 Oct 2018 21:57:22 GMT (envelope-from bcran@FreeBSD.org) Received: (from bcran@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9QLvMow019092; Fri, 26 Oct 2018 21:57:22 GMT (envelope-from bcran@FreeBSD.org) Message-Id: <201810262157.w9QLvMow019092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcran set sender to bcran@FreeBSD.org using -f From: Rebecca Cran Date: Fri, 26 Oct 2018 21:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339796 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: bcran X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 339796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 21:57:23 -0000 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); }