]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkUnixPkg/Sec/UnixThunk.c
Remove the BugBug in package header file for DXE_CORE and DXE_DRIVER which force...
[mirror_edk2.git] / EdkUnixPkg / Sec / UnixThunk.c
index a94cb38d109b0b0acaf96f1d8ad83d6261c7a680..c1988faf591095da13a1f24bc54c0103c80cd5b5 100644 (file)
@@ -89,6 +89,18 @@ SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
   settimer_callback = CallBack;
 }
 
+void
+msSleep (unsigned long Milliseconds)
+{
+  struct timespec ts;
+
+  ts.tv_sec = Milliseconds / 1000;
+  ts.tv_nsec = (Milliseconds % 1000) * 1000000;
+
+  while (nanosleep (&ts, &ts) != 0 && errno == EINTR)
+    ;
+}
+
 void
 GetLocalTime (EFI_TIME *Time)
 {
@@ -110,12 +122,6 @@ GetLocalTime (EFI_TIME *Time)
     | (tm->tm_isdst > 0 ? EFI_TIME_IN_DAYLIGHT : 0);
 }
 
-void
-msSleep (unsigned long Milliseconds)
-{
-  usleep (Milliseconds * 1000);
-}
-
 static void
 TzSet (void)
 {
@@ -147,7 +153,7 @@ GetErrno(void)
 }
 
 extern EFI_STATUS
-UgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, CONST CHAR16 *Title);
+UgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);
 
 EFI_UNIX_THUNK_PROTOCOL mUnixThunkTable = {\r
   EFI_UNIX_THUNK_PROTOCOL_SIGNATURE,\r