[RFC 08/37] usleep.3: Remove incorrect portability note

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That note against using useconds_t if portability is important was
probably true before POSIX, but since POSIX specifies the type in
<sys/types.h>, as recently documented in useconds_t(3), the type
should be fine to use portably.  Moreover, using it helps document
the code, so we better completely remove that warning.

Add a SEE ALSO entry for useconds_t(3).

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man3/usleep.3 | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/man3/usleep.3 b/man3/usleep.3
index 358d6d36e..d6dc4ecc0 100644
--- a/man3/usleep.3
+++ b/man3/usleep.3
@@ -115,24 +115,6 @@ Only the
 .B EINVAL
 error return is documented by SUSv2 and POSIX.1-2001.
 .SH NOTES
-The type
-.I useconds_t
-is an unsigned integer type capable of holding integers
-in the range [0,1000000].
-Programs will be more portable
-if they never mention this type explicitly.
-Use
-.PP
-.in +4n
-.EX
-#include <unistd.h>
-\&...
-    unsigned int usecs;
-\&...
-    usleep(usecs);
-.EE
-.in
-.PP
 The interaction of this function with the
 .B SIGALRM
 signal, and with other timer functions such as
@@ -155,4 +137,5 @@ is unspecified.
 .BR setitimer (2),
 .BR sleep (3),
 .BR ualarm (3),
+.BR useconds_t (3),
 .BR time (7)
-- 
2.33.1




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux