From owner-svn-doc-head@FreeBSD.ORG Tue Jan 14 23:52:10 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13EEDC6F; Tue, 14 Jan 2014 23:52:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F17741751; Tue, 14 Jan 2014 23:52:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0ENq9jb030300; Tue, 14 Jan 2014 23:52:09 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0ENq96e030299; Tue, 14 Jan 2014 23:52:09 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201401142352.s0ENq96e030299@svn.freebsd.org> From: Warren Block Date: Tue, 14 Jan 2014 23:52:09 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43528 - head/en_US.ISO8859-1/books/arch-handbook/driverbasics X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jan 2014 23:52:10 -0000 Author: wblock Date: Tue Jan 14 23:52:09 2014 New Revision: 43528 URL: http://svnweb.freebsd.org/changeset/doc/43528 Log: Whitespace-only fixes, translators please ignore. Modified: head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml Modified: head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml Tue Jan 14 23:45:40 2014 (r43527) +++ head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml Tue Jan 14 23:52:09 2014 (r43528) @@ -4,16 +4,36 @@ $FreeBSD$ --> - - Writing FreeBSD Device Drivers + + + + + Writing FreeBSD Device Drivers + - MurrayStokelyWritten by + + + Murray + Stokely + + + Written by + + - JörgWunschBased on intro(4) manual page by + + + Jörg + Wunsch + + + Based on intro(4) manual page by + - Introduction @@ -48,8 +68,13 @@ Dynamic Kernel Linker Facility - KLD - kernel linkingdynamic - kernel loadable modules (KLD) + + kernel linking + dynamic + + + kernel loadable modules (KLD) + The kld interface allows system administrators to dynamically add and remove functionality from a running system. @@ -61,8 +86,14 @@ kernel modules loading - kernel modulesunloading - kernel moduleslisting + + kernel modules + unloading + + + kernel modules + listing + The kld interface is used through: @@ -130,7 +161,7 @@ DECLARE_MODULE(skeleton, skel_mod, SI_SU Makefile &os; provides a system makefile to simplify compiling a - kernel module. + kernel module. SRCS=skeleton.c KMOD=skeleton @@ -148,7 +179,9 @@ KMOD=skeleton Character Devices - character devices + + character devices + A character device driver is one that transfers data directly to and from a user process. This is the most common type of device driver and there are plenty of simple examples in @@ -160,7 +193,7 @@ KMOD=skeleton Example of a Sample Echo Pseudo-Device Driver for - &os; 10.X + &os; 10.X /* * Simple Echo pseudo-device KLD @@ -337,7 +370,8 @@ Opened device "echo" successfully. Test Data Closing device "echo". - Real hardware devices are described in the next chapter. + Real hardware devices are described in the next + chapter. @@ -350,28 +384,30 @@ Closing device "echo". for which the kernel provides caching. This caching makes block-devices almost unusable, or at least dangerously unreliable. The caching will reorder the sequence of write - operations, depriving the application of the ability to know - the exact disk contents at any one instant in time. This - makes predictable and reliable crash recovery of on-disk data - structures (filesystems, databases etc.) impossible. - Since writes may be delayed, there is no way the kernel can - report to the application which particular write operation - encountered a write error, this further compounds the - consistency problem. For this reason, no serious applications - rely on block devices, and in fact, almost all applications - which access disks directly take great pains to specify that - character (or raw) devices should always be - used. Because the implementation of the aliasing of each disk - (partition) to two devices with different semantics significantly - complicated the relevant kernel code &os; dropped support for - cached disk devices as part of the modernization of the disk I/O + operations, depriving the application of the ability to know the + exact disk contents at any one instant in time. This makes + predictable and reliable crash recovery of on-disk data + structures (filesystems, databases etc.) impossible. Since + writes may be delayed, there is no way the kernel can report to + the application which particular write operation encountered a + write error, this further compounds the consistency problem. + For this reason, no serious applications rely on block devices, + and in fact, almost all applications which access disks directly + take great pains to specify that character (or + raw) devices should always be used. Because the + implementation of the aliasing of each disk (partition) to two + devices with different semantics significantly complicated the + relevant kernel code &os; dropped support for cached disk + devices as part of the modernization of the disk I/O infrastructure. Network Drivers - network devices + + network devices + Drivers for network devices do not use device nodes in order to be accessed. Their selection is based on other decisions made inside the kernel and instead of calling open(), use of a @@ -380,7 +416,5 @@ Closing device "echo". For more information see ifnet(9), the source of the loopback device, and Bill Paul's network drivers. - -