USB_ATTACH_SETUP macros question
Tofig Suleymanov
tofik at oxygen.az
Fri Aug 18 06:41:37 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
> _______________________________________________
> freebsd-usb at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-usb
> To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org"
>
>
Thank you for usefull example.
Now it is clear to me.
Thank you,
Tofig Suleymanov
More information about the freebsd-usb
mailing list