Re: kobj multiple inheritance

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 09/23/03

  • Next message: John Baldwin: "sys/conf/DEFAULT[S]"
    Date: Tue, 23 Sep 2003 15:15:30 -0600 (MDT)
    To: dfr@nlsystems.com
    
    

    In message: <1064305850.68463.67.camel@herring.nlsystems.com>
                Doug Rabson <dfr@nlsystems.com> writes:
    : Hmm. Some kind of SYSINIT-driven ivar index allocator, perhaps?

    I've logn thought this is an excellent idea. Have a 32 bit name
    space. 16 allocated to an interface and 16 that are private to that
    interface. That should be plenty of bits, and the read/write ivar
    routines would still be simple. Hide it behind a macro, and it
    doesn't matter the sizes.

    You'd change:

            switch (which) {
            case PCI_IVAR_ETHADDR:
            ...
            }

    to

            if (IVAR_SELECTOR(which) != pci_ivar)
                    return (EIO); /* or pass it on? */
            switch (IVAR_PRIVATE(which))
            {
            case PCI_IVAR_ETHADDR:
            ...
            }

    Which isn't burdonsome at all. If you have more than 65,000
    interfaces in the system, then you have bigger issues :-)

    Warner
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: John Baldwin: "sys/conf/DEFAULT[S]"