From owner-cvs-all Sat Oct 10 14:10:25 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA01737 for cvs-all-outgoing; Sat, 10 Oct 1998 14:10:25 -0700 (PDT) (envelope-from owner-cvs-all) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA01723; Sat, 10 Oct 1998 14:10:16 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id WAA13195; Sat, 10 Oct 1998 22:09:20 +0100 (BST) Date: Sat, 10 Oct 1998 22:09:20 +0100 (BST) From: Doug Rabson To: "Robert V. Baron" cc: Peter Wemm , cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys kernel.h In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On 10 Oct 1998, Robert V. Baron wrote: > Happy to see that LKD's are being worked on. There is a structural > problem in lkm design. Maybe we can do it right on lkd's. The > problem is that there is a concept of a module. Then there is the > idea that there are services made available. So it is easy to imagine > that a block of code -- a module, would make serveral services > available say vfs, dev, maybe even inodes. So I would argue that the > private data of a module, should be a linked list if it has to be > explicit at all. Then when you call lkmdispatch(), you pass the > module pointer and the service you wish to initialize. You do this as > many times as necessary to setup the module. (You do not pass the > service as the private data of the module). To make things a bit more > concrete, look at coda/coda_fbsd.c and see what had to happen to tuck > Coda in as an lkm. This is directly addressed by the KLD system. The terminology is that a 'file' (ELF or a.out) is loaded by the kernel linker. The file contains a number of 'modules', each of which is initialised and has an event handler (similar to lkmdispatch). The kernel in many ways is a file which contains all the statically linked modules. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039