From owner-freebsd-current Tue Apr 25 9: 3:29 2000 Delivered-To: freebsd-current@freebsd.org Received: from io.yi.org (24.67.218.186.bc.wave.home.com [24.67.218.186]) by hub.freebsd.org (Postfix) with ESMTP id 3594E37BE86 for ; Tue, 25 Apr 2000 09:03:22 -0700 (PDT) (envelope-from jburkhol@home.com) Received: from io.yi.org (localhost.gvcl1.bc.wave.home.com [127.0.0.1]) by io.yi.org (Postfix) with ESMTP id AE322BCA7; Tue, 25 Apr 2000 09:03:40 -0700 (PDT) X-Mailer: exmh version 2.1.1 10/15/1999 To: Bruce Evans Cc: Boris Popov , freebsd-current@FreeBSD.ORG Subject: Re: SMP changes and breaking kld object module compatibility In-Reply-To: Message from Bruce Evans of "Tue, 25 Apr 2000 18:41:14 +1000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Apr 2000 09:03:40 -0700 From: Jake Burkholder Message-Id: <20000425160340.AE322BCA7@io.yi.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Tue, 25 Apr 2000, Boris Popov wrote: > > > simple_lock* functions has breakage too. They defined as macros > > for non-SMP case and as functions for SMP. > > This currently apparently affects the following modules: > > ccd > cd9660 > msdosfs > nfs > ntfs > nwfs > vinum > > All of these functions reference simple_lock() if it is not defined away. > > Bruce Has anyone thought about using kobj(9) for this? For example, it should be possible to make simple_lock and lockmgr locks safe for use from modules by introducing a lock_if.h, which has abstract version of all the lock routines. A class would be compiled with null implementations for UP, or the 'lock'ed implementations for SMP. The old functions would call through an instance of that class, automagically finding the right method. Eventually this could be a runtime abstraction, with both up and smp classes compiled into the kernel, and objects initialized with the right method table at boot time. I have diffs in the works if anyone is interested. Jake. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message