DragonFly submit List (threaded) for 2005-10
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: move DEVICE_POLLING from opt_global.h to opt_polling.h
On 10/22/05, Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> :Following patch move DEVICE_POLLING from opt_global.h to opt_polling.h:
> :http://leaf.dragonflybsd.org/~sephe/opt_polling.diff
> :
> :Please review it.
> :
> :Best Regards,
> :sephe
> :
> :--
> :Live Free or Die
>
> net/if_var.h has all sorts of conditionals on DEVICE_POLLING. Either
net/if_var.h was left out intentionally, since
1) Size and layout of "struct ifnet" are not changed, no matter
whether DEVICE_POLLING is defined or not. So any *.c files that does
not want DEVICE_POLLING can safely ignore opt_polling.h
2) Any *.c file that wants DEVICE_POLLING supports will include
opt_polling.h at its very beginning(at least before net/if.h or
net/if_var.h). This will bring in ifnet.if_poll, poll_cmd and various
polling related functions' declaration. Again, as pointed out in 1),
size and layout of "struct ifnet" are not changed.
3) IMHO, including opt_*.h in system header files will cause trouble
> net/if_var.h needs to include opt_polling.h (conditionally on _KERNEL
> or KLD_MODULE), or the option has to be left in opt_global.h.
>
> I think there were some recent commits that allow modules to use
> the primary opt_*.h files for a compile so its possible that this
> won't break the module build, but it would have to be tested.
If module is not built during kernel building, the primary opt_*.h
will not be used. This is the main reason that I want to put
DEVICE_POLLING in a seperate opt_x.h
Best Regards,
sephe
--
Live Free or Die
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]