diff options
author | marius <marius@FreeBSD.org> | 2017-05-14 14:21:09 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2017-05-14 14:21:09 +0000 |
commit | 6314dd4b859877b0b6e62bfee0679ff14f562d1b (patch) | |
tree | 53fb679066c43776c6ae6e029bd210ebcfdcbfb9 /contrib/netbsd-tests/lib/libc/stdlib/t_exit.c | |
parent | bb5dae3f631153c9c528095117091bb75406e419 (diff) | |
download | FreeBSD-src-6314dd4b859877b0b6e62bfee0679ff14f562d1b.zip FreeBSD-src-6314dd4b859877b0b6e62bfee0679ff14f562d1b.tar.gz |
MFC: r317982
- Also outside of the KOBJOPLOOKUP macro - which in turn is used by
the code auto-generated for *.m - kobj_lookup_method(9) is useful;
for example in back-ends or base class device drivers in order to
determine whether a default method has been overridden. Thus, allow
for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in
order to update the cache entry - of kobj_lookup_method(9), to be
NULL. Actually, that pointer is redundant as it's just set to the
same kobj_method_t that the kobj_lookup_method(9) function returns
in the first place, but probably it serves to reduce the number of
instructions generated for KOBJOPLOOKUP.
- For the same reason, move updating kobj_lookup_{hits,misses} (if
KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP.
As a side-effect, this gets rid of the convoluted approach of always
incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of
a cache miss, decrementing it in kobj_lookup_method(9) again.
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/stdlib/t_exit.c')
0 files changed, 0 insertions, 0 deletions