From owner-freebsd-drivers@FreeBSD.ORG Mon Sep 19 22:40:40 2005 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7185B16A421 for ; Mon, 19 Sep 2005 22:40:40 +0000 (GMT) (envelope-from prichardson@lincoln.ac.uk) Received: from harkonnen.lincoln.ac.uk (harkonnen.lincoln.ac.uk [194.80.59.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD3A343D49 for ; Mon, 19 Sep 2005 22:40:39 +0000 (GMT) (envelope-from prichardson@lincoln.ac.uk) Received: from aexcmb02.network.uni ([194.80.57.9]) by harkonnen.lincoln.ac.uk with esmtp (Exim 4.44) id 1EHUJG-0006CR-R3 for freebsd-drivers@freebsd.org; Mon, 19 Sep 2005 23:40:39 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Sep 2005 23:40:26 +0100 Message-ID: <139F6E4BC4C585478FA84D02D90CC1CA04C5102C@aexcmb02.network.uni> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Newbie Device Driver writer... Thread-Index: AcW9ayFlfQC+7Mj/Qv+77txHr5dfbA== From: "Phil Richardson" To: X-AntiVirus-Scanner: Virus checked by harkonnen.lincoln.ac.uk using Sophie and Sophos AV X-SA-Exim-Connect-IP: 194.80.57.9 X-SA-Exim-Mail-From: prichardson@lincoln.ac.uk X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on harkonnen.lincoln.ac.uk X-Spam-Level: X-Spam-Status: No, score=-5.4 required=9.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-SA-Exim-Version: 4.2 (built Sun, 20 Feb 2005 16:05:43 +0000) X-SA-Exim-Scanned: Yes (on harkonnen.lincoln.ac.uk) Subject: Newbie Device Driver writer... X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2005 22:40:40 -0000 Hi. Im rather new to device driver writing under FreeBSD (in particular Im = using 5.4). I have a PCI based IO card (4x32bit TTL presentation) and = have written a simplistic driver thus far (basic handling is done = completely through IOCTL calls - but it works). However now I have started to think about using the device in a real way = I realise it would be nice to implement asynchronous use. Maybe not the = right term (forgive me) - but in essence I would really like to utilise = this device along with other devices (such as a socket or tty) and use = the Select() call to determine whats happening to who, and when. However - I cannot find any reference anywhere within source code (that = I can recognise at any rate) within existing device drivers (say sio.c) = that suggest how you link a device driver to the select() call itself (I = was expecting to find something like sio_select, much as sio_read, = sio_write and sio_ioctl for example - which shows my inexperience and = definate lack of understanding). Anyone care to give some advice on how the kernel select() call can be = linked into a home-made driver? A pointer to some documentation (dare I = say that - documentation is a bit thin on device drivers so ive = found...) would be a help. Trusting someone somewhere might have a pointer or clue out there..... Regards Phil