From 549d34691d68518e55c2edd6e759b19de7f8ddef Mon Sep 17 00:00:00 2001 From: Kamil Aronowski Date: Wed, 12 Apr 2023 18:50:12 +0200 Subject: Rename 'msecs' to 'usecs' to avoid potential confusion The function msleep uses gBS->Stall which waits for a specified number of microseconds. Reference: https://edk2-docs.gitbook.io/edk-ii-uefi-driver-writer-s-guide/5_uefi_services/51_services_that_uefi_drivers_commonly_use/517_stall This reference even mentions an example sleeping for 10 microseconds: // Wait 10 uS. Notice the letter 'u'. Therefore it's a good idea to call the function 'usleep' rather than 'msleep', so no one confuses it with milliseconds, and to change the argument name to match as well. Signed-off-by: Kamil Aronowski --- lib/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/console.c b/lib/console.c index c7ca3bc2..a751f79d 100644 --- a/lib/console.c +++ b/lib/console.c @@ -745,9 +745,9 @@ setup_verbosity(VOID) #ifndef SHIM_UNIT_TEST VOID -msleep(unsigned long msecs) +usleep(unsigned long usecs) { - BS->Stall(msecs); + BS->Stall(usecs); } #endif -- cgit v1.2.3