summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/opendir.c
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2000-12-06 03:15:49 +0000
committerdeischen <deischen@FreeBSD.org>2000-12-06 03:15:49 +0000
commitcf92dabe14c7581217daf96f6257caae8c56b826 (patch)
tree0dd5c36710eb675e55c9d6b12fdea35f32c5b68e /lib/libc/gen/opendir.c
parent507950431dac1887fe7f639efde6d9a3bcdb790f (diff)
downloadFreeBSD-src-cf92dabe14c7581217daf96f6257caae8c56b826.zip
FreeBSD-src-cf92dabe14c7581217daf96f6257caae8c56b826.tar.gz
Cleanup XXXdir functions to eliminate global hash table of
telldir positions. This will allow (future) locking on a per-DIR basis (for MT-safety). For now, this change does the following: o Remove the hash table from telldir.c. Recode to use queue macros. o Remove 'const' from 'telldir(const DIR *)'. o Remove 'register' variables as suggested in a recent thread. No response from: -current
Diffstat (limited to 'lib/libc/gen/opendir.c')
-rw-r--r--lib/libc/gen/opendir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
index d94b9af..90aaec3 100644
--- a/lib/libc/gen/opendir.c
+++ b/lib/libc/gen/opendir.c
@@ -259,6 +259,8 @@ __opendir2(name, flags)
dirp->dd_loc = 0;
dirp->dd_fd = fd;
dirp->dd_flags = flags;
+ dirp->dd_loccnt = 0;
+ LIST_INIT(&dirp->dd_locq);
/*
* Set up seek point for rewinddir.
OpenPOWER on IntegriCloud