diff options
author | Toomas Soome <tsoome@me.com> | 2018-10-27 23:40:26 +0300 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2018-11-05 11:24:48 -0500 |
commit | 0c54f6ba1331ba286857bec48422da0a9893d269 (patch) | |
tree | adf1c08b01533d53f677fc70b868aa8848c021bc | |
parent | c540c5554db983fb615df293797142edc10b4c62 (diff) | |
download | illumos-joyent-0c54f6ba1331ba286857bec48422da0a9893d269.tar.gz |
9933 libefi: Simplify the EFI delay() function by calling BS->Stall()
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/delay.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/usr/src/boot/sys/boot/efi/libefi/delay.c b/usr/src/boot/sys/boot/efi/libefi/delay.c index c805fa13a7..0bd4339d54 100644 --- a/usr/src/boot/sys/boot/efi/libefi/delay.c +++ b/usr/src/boot/sys/boot/efi/libefi/delay.c @@ -1,4 +1,4 @@ -/*- +/* * Copyright (c) 2001 Doug Rabson * All rights reserved. * @@ -25,7 +25,6 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); #include <efi.h> #include <efilib.h> @@ -35,15 +34,5 @@ void delay(int); 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); } |