]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r317982
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 14 May 2017 14:21:11 +0000 (14:21 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 14 May 2017 14:21:11 +0000 (14:21 +0000)
commit4130c14e1b1899e34da6a0b5cd0e6f7006688e36
tree9b7a7da29aabef3116f921e038e19e7023283d89
parent6ab50658578e650c7326f9ebc61df7d12e60a6e3
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@318275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/subr_kobj.c
sys/sys/kobj.h