diff options
Diffstat (limited to 'man3/readdir_r.3')
-rw-r--r-- | man3/readdir_r.3 | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/man3/readdir_r.3 b/man3/readdir_r.3 index 099591f41..f79dae543 100644 --- a/man3/readdir_r.3 +++ b/man3/readdir_r.3 @@ -21,7 +21,7 @@ Standard C library .P .RS -4 Feature Test Macro Requirements for glibc (see -.BR feature_test_macros (7)): +.MR feature_test_macros 7 ): .RE .P .BR readdir_r (): @@ -31,13 +31,13 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION This function is deprecated; use -.BR readdir (3) +.MR readdir 3 instead. .P The .BR readdir_r () function was invented as a reentrant version of -.BR readdir (3). +.MR readdir 3 . It reads the next directory entry from the directory stream .IR dirp , and returns it in the caller-allocated buffer pointed to by @@ -45,7 +45,7 @@ and returns it in the caller-allocated buffer pointed to by For details of the .I dirent structure, see -.BR readdir (3). +.MR readdir 3 . .P A pointer to the returned buffer is placed in .IR *result ; @@ -54,7 +54,7 @@ then NULL is instead returned in .IR *result . .P It is recommended that applications use -.BR readdir (3) +.MR readdir 3 instead of .BR readdir_r (). Furthermore, since glibc 2.24, glibc deprecates @@ -83,18 +83,18 @@ may return a success status, but the returned field may not be null terminated or may be truncated. .IP \[bu] In the current POSIX.1 specification (POSIX.1-2008), -.BR readdir (3) +.MR readdir 3 is not required to be thread-safe. However, in modern implementations (including the glibc implementation), concurrent calls to -.BR readdir (3) +.MR readdir 3 that specify different directory streams are thread-safe. Therefore, the use of .BR readdir_r () is generally unnecessary in multithreaded programs. In cases where multiple threads must read from the same directory stream, using -.BR readdir (3) +.MR readdir 3 with external synchronization is still preferable to the use of .BR readdir_r (), for the reasons given in the points above. @@ -105,7 +105,7 @@ It is expected that a future version of POSIX.1 will make .BR readdir_r () obsolete, and require that -.BR readdir (3) +.MR readdir 3 be thread-safe when concurrently employed on different directory streams. .SH RETURN VALUE The @@ -125,7 +125,7 @@ Invalid directory stream descriptor \fIdirp\fP. A directory entry whose name was too long to be read was encountered. .SH ATTRIBUTES For an explanation of the terms used in this section, see -.BR attributes (7). +.MR attributes 7 . .TS allbox; lbx lb lb @@ -142,4 +142,4 @@ POSIX.1-2008. .SH HISTORY POSIX.1-2001. .SH SEE ALSO -.BR readdir (3) +.MR readdir 3 |