svn commit: r253460 - head/sys/dev/mps

Adrian Chadd adrian at freebsd.org
Mon Aug 12 01:01:29 UTC 2013


On 11 August 2013 14:40, Scott Long <scott4long at yahoo.com> wrote:
> Thanks, I'll look into it.

Yo!

Damnit, I really should create a generic "here's a 64 bit mask for
debug" set of macros we can use elsewhere.

Anyway, you should consider a #define that means you can avoid
actually evaluating the arguments that you pass in. That saves even
more CPU.

Ie:

#ifdef DRV_DEBUG
#define DPRINTF(sc, mask, ...) do { if ( (sc)->sc_debug & mask )
dev_printf(sc->sc_dev, __VA_ARGS__); } while (0)
#else
#define DPRINTF(sc, mask, ...)
#endif



-adrian


More information about the svn-src-head mailing list