<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/lib/libc/gen/readdir.c, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/lib/libc/gen/readdir.c?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/lib/libc/gen/readdir.c?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2015-09-12T13:34:22Z</updated>
<entry>
<title>Wrap &lt;dirent.h&gt; so that internal calls go direct and they're all weak symbols</title>
<updated>2015-09-12T13:34:22Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2015-09-12T13:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=209e395206c9b2564b5720b7e81f09b0eb38e552'/>
<id>urn:sha1:209e395206c9b2564b5720b7e81f09b0eb38e552</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Optimization, no functional change:</title>
<updated>2014-03-10T07:54:14Z</updated>
<author>
<name>schwarze</name>
<email>schwarze@openbsd.org</email>
</author>
<published>2014-03-10T07:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=06373755481a12c92842f7d38e4928ce5f3de6cf'/>
<id>urn:sha1:06373755481a12c92842f7d38e4928ce5f3de6cf</id>
<content type='text'>
Save a cookie pointing to the very first entry in the DIR.dd_buf
cache buffer and use that to speed up seekdir(3) when rewinding
to that first entry.
No libc bump because DIR is an opaque struct.

When the optimization applies, which in particular it always does
for rewinddir(3) after reading less than about 500 entries,
seekdir(3) execution time drops from 100 to 0.05 milliseconds
on my i386 notebook.  Other cases are not slowed down.

Based on an idea from and ok by guenther@.
</content>
</entry>
<entry>
<title>Nowadays, seekdir(3) doesn't call _readdir_unlocked().</title>
<updated>2013-11-06T22:26:14Z</updated>
<author>
<name>schwarze</name>
<email>schwarze@openbsd.org</email>
</author>
<published>2013-11-06T22:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=1c8956b91967617e2aef9b425fd0b82685e8b611'/>
<id>urn:sha1:1c8956b91967617e2aef9b425fd0b82685e8b611</id>
<content type='text'>
Consequently, the "skipdeleted" argument is always == 1.
Remove it, effectively reverting readdir.c rev. 1.14.
ok millert@ guenther@
</content>
</entry>
<entry>
<title>Remove an unnecessary (void *) cast</title>
<updated>2013-10-06T17:57:54Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2013-10-06T17:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=0bc54f26f004b384352bd1abebe03bc1cbcee9f8'/>
<id>urn:sha1:0bc54f26f004b384352bd1abebe03bc1cbcee9f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Switch time_t, ino_t, clock_t, and struct kevent's ident and data</title>
<updated>2013-08-13T05:52:02Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2013-08-13T05:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=91a535ff42f6347677741774730dc5ddcf7d5b93'/>
<id>urn:sha1:91a535ff42f6347677741774730dc5ddcf7d5b93</id>
<content type='text'>
members to 64bit types.  Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments.  Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir.  Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility.  Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@
</content>
</entry>
<entry>
<title>Make DIR a private type within libc, give it the same underlying</title>
<updated>2012-03-22T04:11:53Z</updated>
<author>
<name>matthew</name>
<email>matthew@openbsd.org</email>
</author>
<published>2012-03-22T04:11:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e55576ca586feb852d7d9044bd637f0e55131029'/>
<id>urn:sha1:e55576ca586feb852d7d9044bd637f0e55131029</id>
<content type='text'>
typedef regardless of __BSD_VISIBLE, and eliminate the dirfd() macro.

ok guenther@
</content>
</entry>
<entry>
<title>If the internal consistency check fails, set errno so that it doesn't</title>
<updated>2012-02-04T23:02:40Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2012-02-04T23:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6ca253dace519dec647e6538f12e568665236473'/>
<id>urn:sha1:6ca253dace519dec647e6538f12e568665236473</id>
<content type='text'>
just look like end-of-directory.

ok krw@ otto@ miod@
</content>
</entry>
<entry>
<title>More shrinkage, a bit for ramdisks but mostly for static binaries:</title>
<updated>2009-11-18T07:43:22Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2009-11-18T07:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=2359975197ffa00213482093de8f8c5905ec9577'/>
<id>urn:sha1:2359975197ffa00213482093de8f8c5905ec9577</id>
<content type='text'>
- wrap with #ifndef NO_LOG_BAD_DNS_RESPONSES libc code that uses
  p_class() and p_type() for diagnostics, then add that define to
  libstub to avoid pulling in res_debug_syms.o
- split rcmd() and ruserok() into separate files, as nothing uses both
- split readdir_r() to its own file
- split syslog_r() from syslog(), as the latter needs localtime(); many
  binaries no longer need to pull in all the time code after this; switch
  from usleep() to nanosleep() while we're at it

(The profit of analysis of -Wl,-M,--cref output)

Chops 888kB from /bin and /sbin on i386

ok deraadt@, miod@
</content>
</entry>
<entry>
<title>Be carefull not to read away the target entry when encountering</title>
<updated>2008-05-01T19:49:18Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2008-05-01T19:49:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6f62afb774fbe24e034f99aa7b791b71e6a4049f'/>
<id>urn:sha1:6f62afb774fbe24e034f99aa7b791b71e6a4049f</id>
<content type='text'>
deleted files after a seekdir(); testcase produced by mbalmer@; fix
with and ok mbalmer; ok millert@
</content>
</entry>
<entry>
<title>alter internal _readdir_unlocked() api to be less confusing, so that</title>
<updated>2008-04-04T21:26:07Z</updated>
<author>
<name>okan</name>
<email>okan@openbsd.org</email>
</author>
<published>2008-04-04T21:26:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=b1daa819cf516d73d3d1cb84b75ec79adc9e39ef'/>
<id>urn:sha1:b1daa819cf516d73d3d1cb84b75ec79adc9e39ef</id>
<content type='text'>
callers may respond accordingly and correctly.

this fixes an issue where readdir_r() could not decipher the difference
between an error or no more entires.

feedback and ok kurt@, ok millert@
</content>
</entry>
</feed>
