⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 headers.htm

📁 What is this ``device driver stuff anyway? Here s a very short introduction to the concept.
💻 HTM
📖 第 1 页 / 共 5 页
字号:
strcpy
</tt></strong>
</td>
<td align="left" valign="top">
Copies a null-terminated character string.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
strlen
</tt></strong>
</td>
<td align="left" valign="top">
Returns the number of characters in a null-terminated string.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
strncmp
</tt></strong>
</td>
<td align="left" valign="top">
Compares two strings, using a specified number of characters.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
strncpy
</tt></strong>
</td>
<td align="left" valign="top">
Copies a null-terminated character string with a specified limit.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
subyte
</tt></strong>
</td>
<td align="left" valign="top">
Writes a byte into user address space.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
suibyte
</tt></strong>
</td>
<td align="left" valign="top">
Writes a byte into user instruction address space.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
suiword
</tt></strong>
</td>
<td align="left" valign="top">
Writes a word into user instruction address space.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
suser
</tt></strong>
</td>
<td align="left" valign="top">
Checks whether the current user is the superuser.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
suword
</tt></strong>
</td>
<td align="left" valign="top">
Writes a word into user address space.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
svatophys
</tt></strong>
</td>
<td align="left" valign="top">
Converts a system virtual address to a physical address.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
swap_lw_bytes
</tt></strong>
</td>
<td align="left" valign="top">
Performs a longword byte swap.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
swap_word_bytes
</tt></strong>
</td>
<td align="left" valign="top">
Performs a short word byte swap.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
swap_words
</tt></strong>
</td>
<td align="left" valign="top">
Performs a word byte swap.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
thread_block
</tt></strong>
</td>
<td align="left" valign="top">
Blocks (puts to sleep) the current kernel thread.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
thread_halt_self
</tt></strong>
</td>
<td align="left" valign="top">
Handles asynchronous traps for self-terminating kernel threads.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
thread_set_timeout
</tt></strong>
</td>
<td align="left" valign="top">
Sets a timer for the current kernel thread.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
thread_terminate
</tt></strong>
</td>
<td align="left" valign="top">
Prepares to stop or stops execution of the specified kernel thread.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
thread_wakeup
</tt></strong>
</td>
<td align="left" valign="top">
Wakes up all kernel threads waiting for the specified event.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
thread_wakeup_one
</tt></strong>
</td>
<td align="left" valign="top">
Wakes up the first kernel thread waiting on a channel.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
timeout
</tt></strong>
</td>
<td align="left" valign="top">
Initializes a callout queue element.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
trunc_page
</tt></strong>
</td>
<td align="left" valign="top">
Truncates the specified address.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
uiomove
</tt></strong>
</td>
<td align="left" valign="top">
Moves data between user and system virtual space.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
unconfigure_driver
</tt></strong>
</td>
<td align="left" valign="top">
Unconfigures a device driver that was dynamically configured.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
unix_master
</tt></strong>
</td>
<td align="left" valign="top">
Forces execution onto the master CPU.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
unix_release
</tt></strong>
</td>
<td align="left" valign="top">
Releases binding of the kernel thread.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
unregister_callback
</tt></strong>
</td>
<td align="left" valign="top">
Deregisters a callback request (interface).
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
untimeout
</tt></strong>
</td>
<td align="left" valign="top">
Removes the scheduled interface from the callout queues.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
uprintf
</tt></strong>
</td>
<td align="left" valign="top">
Is a nonsleeping kernel printf function.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
vm_map_pageable
</tt></strong>
</td>
<td align="left" valign="top">
Sets pageability of the specified address range.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
vtop
</tt></strong>
</td>
<td align="left" valign="top">
Converts any virtual address to a physical address.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
wakeup
</tt></strong>
</td>
<td align="left" valign="top">
Wakes up all processes sleeping on a specified address.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
WRITE_BUS_D8
</tt></strong>
</td>
<td align="left" valign="top">
Writes a byte (8 bits) to a device register.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
WRITE_BUS_D16
</tt></strong>
</td>
<td align="left" valign="top">
Writes a word (16 bits) to a device register.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
WRITE_BUS_D32
</tt></strong>
</td>
<td align="left" valign="top">
Writes a longword (32 bits) to a device register.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
WRITE_BUS_D64
</tt></strong>
</td>
<td align="left" valign="top">
Writes a quadword (64 bits) to a device register.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
writedisklabel
</tt></strong>
</td>
<td align="left" valign="top">
Writes a disk label.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
write_io_port
</tt></strong>
</td>
<td align="left" valign="top">
Writes data to a device register.
</td>
</tr>
</tbody></table><p>
<a name="ListofGlobalVars"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="headers_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="headers_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#SumryTables"><img src="headers_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#Listofkernsupp_rtns"><img src="headers_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#ListofStructDescrips"><img src="headers_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut28.html"><img src="headers_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="headers_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="headers_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
A.3&nbsp;&nbsp;&nbsp;&nbsp;List of Global Variables
</h2>
<p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut27.html#sumryglob_vars">Table A-3</a>
summarizes the global variables that device drivers use.
Chapter 2
of
<cite>Writing Device Drivers: Reference</cite>
provides reference page descriptions of the global variables
listed in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut27.html#sumryglob_vars">Table A-3</a>.
</p><p>
<a name="nx_id_887"></a>
<a name="sumryglob_vars"></a>
</p><h3>
Table A-3: Summary Descriptions of Global Variables
</h3>
<table border="4" cellpadding="4">
<tbody><tr>
<td align="left" valign="top">
<strong>
Global Variable
</strong>
</td>
<td align="left" valign="top">
<strong>
Summary Description
</strong>
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
cpu
</tt></strong>
</td>
<td align="left" valign="top">
Provides a unique logical processor-type family identifier.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
hz
</tt></strong>
</td>
<td align="left" valign="top">
Stores the number of clock ticks per second.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
lbolt
</tt></strong>
</td>
<td align="left" valign="top">
Is a periodic wakeup mechanism.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
page_size
</tt></strong>
</td>
<td align="left" valign="top">
Is the virtual page size.
</td>
</tr>
</tbody></table><p>
<a name="ListofStructDescrips"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="headers_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="headers_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#SumryTables"><img src="headers_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#ListofGlobalVars"><img src="headers_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#ListofDevDrvInter"><img src="headers_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut28.html"><img src="headers_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="headers_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="headers_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
A.4&nbsp;&nbsp;&nbsp;&nbsp;List of Data Structures
</h2>
<p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut27.html#structsused_drvs">Table A-4</a>
summarizes the structures that device drivers use.
Chapter 3
of
<cite>Writing Device Drivers: Reference</cite>
provides reference page descriptions of the structures listed in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut27.html#structsused_drvs">Table A-4</a>.
</p><p>
<a name="nx_id_888"></a>
<a name="structsused_drvs"></a>
</p><h3>
Table A-4: Summary Descriptions of Data Structures
</h3>
<table border="4" cellpadding="4">
<tbody><tr>
<td align="left" valign="top">
<strong>
Structure Name
</strong>
</td>
<td align="left" valign="top">
<strong>
Meaning
</strong>
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
buf
</tt></strong>
</td>
<td align="left" valign="top">
Describes arbitrary I/O.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
bus
</tt></strong>
</td>
<td align="left" valign="top">
Represents an instance of a bus entity to which other buses or
controllers are logically attached.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
cfg_attr_t
</tt></strong>
</td>
<td align="left" valign="top">
Contains information for managing the loading and unloading of drivers.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
cfg_subsys_attr_t
</tt></strong>
</td>
<td align="left" valign="top">
Contains attribute information for drivers.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
controller
</tt></strong>
</td>
<td align="left" valign="top">
Contains members that store information about hardware resources and
store data for communication between the kernel and the device driver.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
controller_config
</tt></strong>
</td>
<td align="left" valign="top">
Contains information needed to create a
<tt>controller</tt>
structure.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
DEVGEOMST
</tt></strong>
</td>
<td align="left" valign="top">
Stores disk device geometry.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
devget
</tt></strong>
</td>
<td align="left" valign="top">
Contains information about a device.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
device
</tt></strong>
</td>
<td align="left" valign="top">
Contains information that identifies the device.
There is one
<tt>device</tt>
data structure for each device connected to the controller.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
device_config
</tt></strong>
</td>
<td align="left" valign="top">
Contains information needed to create a
<tt>device</tt>
structure.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
device_info_t
</tt></strong>
</td>
<td align="left" valign="top">
Is the top-level union that stores bus- and device-type information.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
disklabel
</tt></strong>
</td>
<td align="left" valign="top">
Stores disk device label information.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
driver
</tt></strong>
</td>
<td align="left" valign="top">
Defines driver entry points and other driver-specific information.
You initialize this data structure in the device driver.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
dsent

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -