From owner-freebsd-arch@FreeBSD.ORG Tue Jul 15 15:38:12 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90D86D77 for ; Tue, 15 Jul 2014 15:38:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B2422EA for ; Tue, 15 Jul 2014 15:38:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E850EB91E; Tue, 15 Jul 2014 11:38:10 -0400 (EDT) From: John Baldwin To: johnandsara2@cox.net Subject: Re: How to properly handle several fonctions provided by the Winbond SuperIO chip? Date: Tue, 15 Jul 2014 10:36:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <1118241087.138096.1403180509132.JavaMail.zimbra@arkoon-netasq.com> <53C09B48.8000709@cox.net> In-Reply-To: <53C09B48.8000709@cox.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201407151036.15266.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 15 Jul 2014 11:38:11 -0400 (EDT) Cc: Emeric POUPON , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 15:38:12 -0000 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