summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/getdirentries.2
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys/getdirentries.2')
-rw-r--r--lib/libc/sys/getdirentries.222
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2
index 6df9444..9e6dc50 100644
--- a/lib/libc/sys/getdirentries.2
+++ b/lib/libc/sys/getdirentries.2
@@ -120,6 +120,28 @@ The current position pointer should only be set to a value returned by
a value returned in the location pointed to by
.Fa basep ,
or zero.
+.Sh IMPLEMENTATION NOTES
+.Pp
+In the non-threaded library
+.Fn getdirentries
+is implemented as the
+.Va getdirentries
+syscall.
+.Pp
+In the threaded library, the
+.Va getdirentries
+syscall is assembled to
+.Fn _thread_sys_getdirentries
+and
+.Fn getdirentries
+is implemented as a function which locks
+.Va fd
+for read and write, then calls
+.Fn _thread_sys_getdirentries .
+Before returning,
+.Fn getdirentries
+unlocks
+.Va fd .
.Sh RETURN VALUES
If successful, the number of bytes actually transferred is returned.
Otherwise, -1 is returned and the global variable
OpenPOWER on IntegriCloud