Date: Sun, 17 Dec 1995 06:17:04 +1100 From: Bruce Evans <bde@zeta.org.au> To: CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, peter@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 autoconf.c machdep.c Message-ID: <199512161917.GAA07610@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> Modified: sys/i386/i386 autoconf.c machdep.c
> Log:
> Catch a couple more null devsw dereferences...
There should be dummy tables so that all these tests aren't necessary:
initial bdevsw[] = { &dummy, &dummy, ... };
Similarly, inside each *bdevsw[maj], there should be pointers to dummy
functions, not null pointers.
The cost of indirect tables may be more than compensated for by the
simpler indexing:
old now
--- ---
(&bdevsw[maj])->d_open *bdevsw[maj]->d_open
^^^^^^^^^^^^^^ ^^^^^^^^^^^^
complicated address calc. simple address calc., extra indirection
Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512161917.GAA07610>
