How to properly handle several fonctions provided by the Winbond SuperIO chip?

John Baldwin jhb at freebsd.org
Tue Jul 15 15:38:12 UTC 2014


On Friday, July 11, 2014 10:19:52 pm John D. Hendrickson and Sara Darnell wrote:
> John Baldwin wrote:
> > On Thursday, July 10, 2014 7:37:04 pm John D. Hendrickson and Sara Darnell 
> > wrote:
> >> John Baldwin wrote:
> >>> On Thursday, June 19, 2014 11:21:59 am Emeric POUPON wrote:
> >>>> Thanks for your answer!
> > 
> > No, the question is if you have two C files that are compiled into a single 
> > loading object (foo.ko), do they call each other's functions directly or do 
> > they use an indirection layer like kobj to call into each other.
> 
> thx.  i shouldn't answer (i asked) i just read linux kernel
> at times.
> 
> i just assume the "two files" are both for the same kernel module and 
> it would be ok.  in which case using two C files isn't necessary

Often times code is split into multiple C files so it is easier for people
to understand even if the computer doesn't really care.

> ... but might confuse the Makefiles macros if they guess one C per mod
> 
> try put both in one C file and spin the wheel why not try ?
> 
> two diff mods call each other, in one .o or not, diff story i think

Correct.

-- 
John Baldwin


More information about the freebsd-arch mailing list