> On Sep 12, 2021, at 9:14 AM, Taylor R Campbell 
> <campbell+netbsd-tech-k...@mumble.net> wrote:
> 
>> Date: Sun, 12 Sep 2021 08:57:07 -0700
>> From: Jason Thorpe <thor...@me.com>
>> 
>>> On Sep 12, 2021, at 8:17 AM, Jason Thorpe <thor...@me.com> wrote:
>>> 
>>> Doing this with symbols is a mess.
>> 
>> Here's a way to basically get most of what you want without
>> referencing symbols:
> 
> Now the linker doesn't detect namespace collisions.  So if two
> different subsystems in different modules take the same name you might
> silently get runtime memory corruption.

I think we’re at a point here where we disagree on whether or not this will be 
an actual problem.  I don’t believe it will be an actual problem and is 
therefore not worth the extra module management complexity (which isn’t free 
from a “space” perspective because each module has to have code to handle 
loading and unloading).  We’re in engineering trade-off land here, and I think 
you’re making the wrong one.

In any case, here is a diff that adds the argument structure type checking.  I 
also added an awk program to generate the argument structures and all of the 
call binding stuff automatically from an interface description file.  So, if 
someone wants to deal with the additional module management complexity, they 
can change gendevcalls.awk, re-gen the header files, and all of the call sites 
will be updated automatically.

        https://www.netbsd.org/~thorpej/device-call-typing-diffs.txt

-- thorpej

Reply via email to