summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-06-09 08:34:35 +0000
committerjb <jb@FreeBSD.org>1998-06-09 08:34:35 +0000
commitd2092193486c87de1ff16b223a4ba59bc634c796 (patch)
tree0835ce791f6466859aa48a7cc1e8567a9d22e0f9 /lib/libc/sys
parent05385aab221ae2f336cb1a11fca17e94d1f03a79 (diff)
downloadFreeBSD-src-d2092193486c87de1ff16b223a4ba59bc634c796.zip
FreeBSD-src-d2092193486c87de1ff16b223a4ba59bc634c796.tar.gz
Implement thread support for libc_r. Make the lseek syscall directly
to avoid recursive locking.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/netbsd_getdirentries.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/sys/netbsd_getdirentries.c b/lib/libc/sys/netbsd_getdirentries.c
index 816c8a1..63485ad 100644
--- a/lib/libc/sys/netbsd_getdirentries.c
+++ b/lib/libc/sys/netbsd_getdirentries.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: netbsd_getdirentries.c,v 1.1 1998/03/09 07:07:20 jb Exp $ */
/* From: NetBSD: getdirentries.c,v 1.1 1997/10/10 02:15:56 fvdl Exp */
/*
@@ -34,17 +34,22 @@
*/
#include <sys/types.h>
+#include <sys/syscall.h>
#include <dirent.h>
#include <unistd.h>
int getdents __P((int, char *, size_t));
int
+#ifdef _THREAD_SAFE
+_thread_sys_getdirentries(fd, buf, nbytes, basep)
+#else
getdirentries(fd, buf, nbytes, basep)
+#endif
int fd, nbytes;
char *buf;
long *basep;
{
- *basep = lseek(fd, 0, SEEK_CUR);
+ *basep = __syscall((quad_t) SYS_lseek,fd, 0, 0, SEEK_CUR);
return getdents(fd, buf, nbytes);
}
OpenPOWER on IntegriCloud