]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Uefi/select.c
StdLib: Move the declarations for ffs() and bzero() from extern.h to strings.h.
[mirror_edk2.git] / StdLib / LibC / Uefi / select.c
index 8da03e65d024f8d74375244340d16680ca4ac75a..28951856d1b067934171149f779d5fe9225eb45e 100644 (file)
 \r
 #include <stdlib.h>\r
 #include <unistd.h>\r
-#include <string.h>\r
+#include <strings.h>\r
 #include <sys/poll.h>\r
 #include <sys/param.h>\r
 #include <sys/time.h>\r
-#include  <extern.h>      /* For ffs() */\r
 #ifndef KERNEL\r
 #define KERNEL\r
 #include <errno.h>\r
 \r
 #define MAX_SLEEP_DELAY 0xfffffffe\r
 \r
-//\r
-//  Name:\r
-//      usleep\r
-//\r
-//  Description:\r
-//      Implement usleep(3) function.\r
-//\r
-//  Arguments:\r
-//      Microseconds to sleep.\r
-//\r
-//  Returns:\r
-//      0\r
-//\r
+/** Sleep for the specified number of Microseconds.\r
+\r
+    Implements the usleep(3) function.\r
+\r
+    @param[in]    Microseconds    Number of microseconds to sleep.\r
+\r
+    @retval   0   Always returns zero.\r
+**/\r
 int\r
 usleep( useconds_t Microseconds )\r
 {\r
@@ -98,6 +92,12 @@ usleep( useconds_t Microseconds )
   return (0);\r
 }\r
 \r
+unsigned int\r
+sleep( unsigned int Seconds )\r
+{\r
+  return (usleep( (useconds_t)(Seconds * 1000000) ));\r
+}\r
+\r
 static int\r
 selscan(\r
   fd_mask **ibits,\r