USB_ATTACH_SETUP macros question
Hans Petter Selasky
hselasky at c2i.net
Thu Aug 17 13:34:45 UTC 2006
>
> Made a little test which shows that this code is going to be executed only
> once.How did i miss that :) Now the other question comes next:
> Why don not we use just:
> #define USB_ATTACH_SETUP \
> sc->sc_dev = self; \
> device_set_desc_copy(self, devinfo); \
> device_printf(self, "%s\n", devinfo);
Because that is dangerous.
Consider the following:
if (1) USB_ATTACH_SETUP;
What is the meaning of the statement above?
What is going to get executed?
--HPS
More information about the freebsd-usb
mailing list