Linux Device Drivers (3rd Edition) [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Device Drivers (3rd Edition) [Electronic resources] - نسخه متنی

Jonathan Corbet, Greg Kroah-Hartman, Alessandro Rubini

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








Chapter 3. Char Drivers


The goal of this chapter is to write a complete char device driver.
We develop a character driver because this class is suitable for most
simple hardware devices. Char drivers are also easier to understand
than block drivers or network drivers (which we get to in later
chapters). Our ultimate aim is to write a
modularized char driver, but we
won't talk about modularization issues in this
chapter.

Throughout the chapter, we present
code fragments extracted from a real device driver:
scull (Simple
Character Utility for
Loading Localities). scull is a char driver that
acts on a memory area as though it were a device. In this chapter,
because of that peculiarity of scull, we use the
word device interchangeably with
"the memory area used by
scull."

The advantage of scull is that it
isn't hardware dependent. scull
just acts on some memory, allocated from the kernel. Anyone can
compile and run scull, and
scull is portable across the computer
architectures on which Linux runs. On the other hand, the device
doesn't do anything
"useful" other than demonstrate the
interface between the kernel and char drivers and allow the user to
run some tests.


    / 202