亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cdrom-standard.tex

?? 嵌入式系統(tǒng)設(shè)計與實驗教材二源碼linux內(nèi)核移植與編譯
?? TEX
?? 第 1 頁 / 共 4 頁
字號:
\cdrom\ hardware and/or low-level \cdrom\ driver when a \cdrom\ driveis registered with the \UCD. The value $n_minors$ should be a positivevalue indicating the number of minor devices that are supported bythe low-level device driver, normally~1. Although these two variablesare `informative' rather than `operational,' they are included in$cdrom_device_ops$ because they describe the capability of the {\emdriver\/} rather than the {\em drive}. Nomenclature has always beendifficult in computer programming.Note that most functions have fewer parameters than their$blkdev_fops$ counterparts. This is because very little of theinformation in the structures $inode$ and $file$ is used. For mostdrivers, the main parameter is the $struct$ $cdrom_device_info$, fromwhich the major and minor number can be extracted. (Most low-level\cdrom\ drivers don't even look at the major and minor number though,since many of them only support one device.) This will be availablethrough $dev$ in $cdrom_device_info$ described below.The drive-specific, minor-like information that is registered with\cdromc, currently contains the following fields:$$\halign{$#$\ \hfil&$#$\ \hfil&\hbox to 10em{$#$\hss}&  $/*$ \rm# $*/$\hfil\crstruct& cdrom_device_info\ \{ \hidewidth\cr  & struct\ cdrom_device_ops *& ops;& device operations for this major\cr  & struct\ cdrom_device_info *& next;& next device_info for this major\cr  & void *&  handle;& driver-dependent data\cr\noalign{\medskip}  & kdev_t&  dev;& device number (incorporates minor)\cr  & int& mask;& mask of capability: disables them \cr  & int& speed;& maximum speed for reading data \cr  & int& capacity;& number of discs in a jukebox \cr\noalign{\medskip}  &int& options : 30;& options flags \cr  &unsigned& mc_flags : 2;& media-change buffer flags \cr  & int& use_count;& number of times device is opened\cr  & char& name[20];& name of the device type\cr\}\cr}$$Using this $struct$, a linked list of the registered minor devices isbuilt, using the $next$ field. The device number, the device operationsstruct and specifications of properties of the drive are stored in thisstructure.The $mask$ flags can be used to mask out some of the capabilities listedin $ops\to capability$, if a specific drive doesn't support a featureof the driver. The value $speed$ specifies the maximum head-rate of thedrive, measured in units of normal audio speed (176\,kB/sec raw data or150\,kB/sec file system data). The value $n_discs$ should reflect thenumber of discs the drive can hold simultaneously, if it is designedas a juke-box, or otherwise~1. The parameters are declared $const$because they describe properties of the drive, which don't change afterregistration.A few registers contain variables local to the \cdrom\ drive. Theflags $options$ are used to specify how the general \cdrom\ routinesshould behave. These various flags registers should provide enoughflexibility to adapt to the different users' wishes (and {\em not\/} the`arbitrary' wishes of the author of the low-level device driver, as isthe case in the old scheme). The register $mc_flags$ is used to bufferthe information from $media_changed()$ to two separate queues. Otherdata that is specific to a minor drive, can be accessed through $handle$,which can point to a data structure specific to the low-level driver.The fields $use_count$, $next$, $options$ and $mc_flags$ need not beinitialized.The intermediate software layer that \cdromc\ forms will perform someadditional bookkeeping. The use count of the device (the number ofprocesses that have the device opened) is registered in $use_count$. Thefunction $cdrom_ioctl()$ will verify the appropriate user-memory regionsfor read and write, and in case a location on the CD is transferred,it will `sanitize' the format by making requests to the low-leveldrivers in a standard format, and translating all formats between theuser-software and low level drivers. This relieves much of the drivers'memory checking and format checking and translation. Also, the necessarystructures will be declared on the program stack.The implementation of the functions should be as defined in thefollowing sections. Two functions {\em must\/} be implemented, namely$open()$ and $release()$. Other functions may be omitted, theircorresponding capability flags will be cleared upon registration.Generally, a function returns zero on success and negative on error. Afunction call should return only after the command has completed, but ofcourse waiting for the device should not use processor time.\subsection{$Int\ open(struct\ cdrom_device_info * cdi, int\ purpose)$}$Open()$ should try to open the device for a specific $purpose$, whichcan be either:\begin{itemize}\item[0] Open for reading data, as done by {\tt {mount()}} (2), or theuser commands {\tt {dd}} or {\tt {cat}}.  \item[1] Open for $ioctl$ commands, as done by audio-CD playingprograms.\end{itemize}In case the driver supports modules, the call $MOD_INC_USE_COUNT$should be performed exactly once, if the $open()$ was successful. Thereturn value is negative on error, and zero on success. Theopen-for-ioctl call can only fail if there is no hardware.Notice that any strategic code (closing tray upon $open()$, etc.)\ isdone by the calling routine in \cdromc, so the low-level routineshould only be concerned with proper initialization, such as spinningup the disc, etc. % and device-use count\subsection{$Void\ release(struct\ cdrom_device_info * cdi)$}In case of module support, a single call $MOD_DEC_USE_COUNT$ should becoded here.  Possibly other device-specific actions should be takensuch as spinning down the device. However, strategic actions such asejection of the tray, or unlocking the door, should be left over tothe general routine $cdrom_release()$. Also, the invalidation of theallocated buffers in the VFS is taken care of by the routine in\cdromc.  This is the only function returning type $void$. \subsection{$Int\ drive_status(struct\ cdrom_device_info * cdi, int\ slot_nr)$}\label{drive status}The function $drive_status$, if implemented, should provideinformation on the status of the drive (not the status of the disc,which may or may not be in the drive). If the drive is not a changer,$slot_nr$ should be ignored. In \cdromh\ the possibilities are listed: $$\halign{$#$\ \hfil&$/*$ \rm# $*/$\hfil\crCDS_NO_INFO& no information available\crCDS_NO_DISC& no disc is inserted, tray is closed\crCDS_TRAY_OPEN& tray is opened\crCDS_DRIVE_NOT_READY& something is wrong, tray is moving?\crCDS_DISC_OK& a disc is loaded and everything is fine\cr}$$\subsection{$Int\ media_changed(struct\ cdrom_device_info * cdi, int\ disc_nr)$}This function is very similar to the original function in $struct\ file_operations$. It returns 1 if the medium of the device $cdi\todev$ has changed since the last call, and 0 otherwise. The parameter$disc_nr$ identifies a specific slot in a juke-box, it should beignored for single-disc drives.  Note that by `re-routing' thisfunction through $cdrom_media_changed()$, we can implement separatequeues for the VFS and a new $ioctl()$ function that can report devicechanges to software (\eg, an auto-mounting daemon).\subsection{$Int\ tray_move(struct\ cdrom_device_info * cdi, int\ position)$}This function, if implemented, should control the tray movement. (Noother function should control this.) The parameter $position$ controlsthe desired direction of movement:\begin{itemize}\item[0] Close tray\item[1] Open tray\end{itemize}This function returns 0 upon success, and a non-zero value uponerror. Note that if the tray is already in the desired position, noaction need be taken, and the return value should be 0. \subsection{$Int\ lock_door(struct\ cdrom_device_info * cdi, int\ lock)$}This function (and no other code) controls locking of the door, if thedrive allows this. The value of $lock$ controls the desired lockingstate:\begin{itemize}\item[0] Unlock door, manual opening is allowed\item[1] Lock door, tray cannot be ejected manually\end{itemize}This function returns 0 upon success, and a non-zero value uponerror. Note that if the door is already in the requested state, noaction need be taken, and the return value should be 0. \subsection{$Int\ select_speed(struct\ cdrom_device_info * cdi, int\ speed)$}Some \cdrom\ drives are capable of changing their head-speed. Thereare several reasons for changing the speed of a \cdrom\ drive. Badlypressed \cdrom s may benefit from less-than-maximum head rate. Modern\cdrom\ drives can obtain very high head rates (up to $24\times$ iscommon).  It has been reported that these drives can make readingerrors at these high speeds, reducing the speed can prevent data lossin these circumstances.  Finally, some of these drives canmake an annoyingly loud noise, which a lower speed may reduce. %Finally,%although the audio-low-pass filters probably aren't designed for it,%more than real-time playback of audio might be used for high-speed%copying of audio tracks.This function specifies the speed at which data is read or audio isplayed back. The value of $speed$ specifies the head-speed of thedrive, measured in units of standard cdrom speed (176\,kB/sec raw dataor 150\,kB/sec file system data). So to request that a \cdrom\ driveoperate at 300\,kB/sec you would call the CDROM_SELECT_SPEED $ioctl$with $speed=2$. The special value `0' means `auto-selection', \ie,maximum data-rate or real-time audio rate. If the drive doesn't havethis `auto-selection' capability, the decision should be made on thecurrent disc loaded and the return value should be positive. A negativereturn value indicates an error.\subsection{$Int\ select_disc(struct\ cdrom_device_info * cdi, int\ number)$}If the drive can store multiple discs (a juke-box) this functionwill perform disc selection. It should return the number of theselected disc on success, a negative value on error. Currently, onlythe ide-cd driver supports this functionality.\subsection{$Int\ get_last_session(struct\ cdrom_device_info * cdi, struct\  cdrom_multisession * ms_info)$}This function should implement the old corresponding $ioctl()$. Fordevice $cdi\to dev$, the start of the last session of the current discshould be returned in the pointer argument $ms_info$. Note thatroutines in \cdromc\ have sanitized this argument: its requestedformat will {\em always\/} be of the type $CDROM_LBA$ (linear blockaddressing mode), whatever the calling software requested. Butsanitization goes even further: the low-level implementation mayreturn the requested information in $CDROM_MSF$ format if it wishes so(setting the $ms_info\rightarrow addr_format$ field appropriately, ofcourse) and the routines in \cdromc\ will make the transformation ifnecessary. The return value is 0 upon success.\subsection{$Int\ get_mcn(struct\ cdrom_device_info * cdi, struct\  cdrom_mcn * mcn)$}Some discs carry a `Media Catalog Number' (MCN), also called`Universal Product Code' (UPC). This number should reflect the numberthat is generally found in the bar-code on the product. Unfortunately,the few discs that carry such a number on the disc don't even use thesame format. The return argument to this function is a pointer to apre-declared memory region of type $struct\ cdrom_mcn$. The MCN isexpected as a 13-character string, terminated by a null-character.\subsection{$Int\ reset(struct\ cdrom_device_info * cdi)$}This call should perform a hard-reset on the drive (although incircumstances that a hard-reset is necessary, a drive may very well notlisten to commands anymore). Preferably, control is returned to thecaller only after the drive has finished resetting. If the drive is nolonger listening, it may be wise for the underlying low-level cdromdriver to time out.\subsection{$Int\ audio_ioctl(struct\ cdrom_device_info * cdi, unsigned\  int\ cmd, void * arg)$}Some of the \cdrom-$ioctl$s defined in \cdromh\ can beimplemented by the routines described above, and hence the function$cdrom_ioctl$ will use those. However, most $ioctl$s deal withaudio-control. We have decided to leave these to be accessed through asingle function, repeating the arguments $cmd$ and $arg$. Note thatthe latter is of type $void*{}$, rather than $unsigned\ long\int$. The routine $cdrom_ioctl()$ does do some useful things,though. It sanitizes the address format type to $CDROM_MSF$ (Minutes,Seconds, Frames) for all audio calls. It also verifies the memorylocation of $arg$, and reserves stack-memory for the argument. Thismakes implementation of the $audio_ioctl()$ much simpler than in theold driver scheme. For example, you may look up the function$cm206_audio_ioctl()$ in {\tt {cm206.c}} that should be updated withthis documentation. An unimplemented ioctl should return $-ENOSYS$, but a harmless request(\eg, $CDROMSTART$) may be ignored by returning 0 (success). Othererrors should be according to the standards, whatever they are. Whenan error is returned by the low-level driver, the \UCD\ tries whenever

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩高清影院| 久久亚区不卡日本| 国产成人综合精品三级| 亚洲激情av在线| 国产亚洲人成网站| 7777精品伊人久久久大香线蕉完整版 | 不卡一二三区首页| 免费人成精品欧美精品| 亚洲激情男女视频| 欧美激情一区三区| 亚洲精品一区二区三区在线观看 | 97国产一区二区| 国产乱国产乱300精品| 日韩av电影免费观看高清完整版| 国产精品免费看片| 久久精品人人做人人爽人人| 91麻豆精品国产91久久久久久久久| 91蝌蚪porny| 成人美女在线视频| 国产成人av电影在线观看| 久久国内精品视频| 蜜臀久久99精品久久久久久9| 亚洲一区二区三区四区的| 综合久久久久久| 日本一区二区三区电影| 久久久蜜桃精品| 精品国产123| 日韩精品一区二区三区在线| 91麻豆精品国产综合久久久久久| 欧美综合久久久| 色婷婷综合激情| 99久久婷婷国产综合精品| 国产成人精品免费一区二区| 国产精品夜夜嗨| 国产成人综合在线| 国产激情视频一区二区在线观看 | 久久er99精品| 久久99久久精品欧美| 久久精品99国产精品| 久久99精品久久只有精品| 久久成人久久爱| 黄色资源网久久资源365| 精品一二三四在线| 国产精品原创巨作av| 国产精品亚洲综合一区在线观看| 国产经典欧美精品| 成人精品鲁一区一区二区| 成人av在线资源| 一本高清dvd不卡在线观看| 色综合天天综合在线视频| 色哦色哦哦色天天综合| 91国产丝袜在线播放| 欧美日韩亚洲国产综合| 欧美电影在线免费观看| 欧美一区二区三区婷婷月色 | 中文一区二区完整视频在线观看| 国产欧美综合在线观看第十页| 中文字幕不卡在线播放| 亚洲精品视频在线看| 亚洲一区二区五区| 免费观看成人av| 国产精品1区2区| 91在线码无精品| 欧美高清一级片在线| 欧美大胆人体bbbb| 欧美激情在线观看视频免费| 一区二区在线观看视频| 日本欧美大码aⅴ在线播放| 国产自产v一区二区三区c| 成人av在线一区二区| 欧美日韩国产综合一区二区| 26uuu久久天堂性欧美| 国产精品免费网站在线观看| 亚洲国产婷婷综合在线精品| 另类小说图片综合网| av一区二区三区四区| 欧美一级在线视频| 国产精品免费网站在线观看| 亚洲va欧美va人人爽| 国产福利不卡视频| 欧美日韩电影在线| 国产欧美一区二区三区沐欲| 亚洲最色的网站| 激情五月婷婷综合| 色av成人天堂桃色av| 精品精品欲导航| 樱桃国产成人精品视频| 国产综合久久久久影院| 欧亚洲嫩模精品一区三区| 欧美电影免费提供在线观看| 国产精品久久久久久久久久免费看 | 久久女同性恋中文字幕| 亚洲裸体xxx| 国产一区二区三区综合| 欧美中文字幕一区| 亚洲国产经典视频| 秋霞影院一区二区| 在线观看中文字幕不卡| 国产精品午夜电影| 免费观看91视频大全| 在线亚洲一区二区| 欧美国产精品劲爆| 蜜臀av性久久久久av蜜臀妖精| 91麻豆精东视频| 欧美国产激情二区三区| 麻豆精品久久久| 欧美日韩国产系列| 一区二区三区四区中文字幕| 粉嫩高潮美女一区二区三区 | 国产午夜精品久久久久久久| 日欧美一区二区| 欧美视频一区二| 亚洲人成人一区二区在线观看 | 97se亚洲国产综合在线| 久久久99精品久久| 韩国三级在线一区| 日韩午夜激情av| 午夜av一区二区| 精品视频一区二区不卡| 亚洲欧美偷拍三级| 99国产精品一区| 国产精品蜜臀av| 丁香婷婷深情五月亚洲| 国产亚洲1区2区3区| 激情综合网激情| 精品日韩成人av| 美国毛片一区二区三区| 欧美一级在线观看| 蜜桃精品视频在线| 精品女同一区二区| 精品一区二区三区香蕉蜜桃| 日韩视频一区二区在线观看| 奇米777欧美一区二区| 在线观看91精品国产麻豆| 三级成人在线视频| 777奇米四色成人影色区| 秋霞午夜鲁丝一区二区老狼| 91精品国产综合久久久蜜臀粉嫩 | 中文字幕中文字幕一区| 国产91在线|亚洲| 中日韩av电影| 91在线视频官网| 一区二区三区欧美| 欧美色区777第一页| 丝袜a∨在线一区二区三区不卡| 欧美日韩国产片| 麻豆国产精品一区二区三区| 精品动漫一区二区三区在线观看| 国产在线观看免费一区| 中文字幕av一区二区三区| 91一区一区三区| 亚洲电影欧美电影有声小说| 欧美一级欧美一级在线播放| 久88久久88久久久| 国产欧美一区二区精品忘忧草 | 欧美日韩久久一区二区| 日本不卡视频在线| 久久亚洲影视婷婷| av在线免费不卡| 亚洲高清免费视频| 精品久久人人做人人爽| av一区二区三区| 日韩精品久久久久久| 精品成人一区二区| 99re在线精品| 日韩精品1区2区3区| 欧美精品一区视频| 91污在线观看| 免费久久99精品国产| 久久久国产精华| 日本道精品一区二区三区| 美女免费视频一区二区| 国产精品麻豆视频| 欧美丰满高潮xxxx喷水动漫| 国产91富婆露脸刺激对白| 亚洲狠狠爱一区二区三区| 2019国产精品| 欧美在线免费观看视频| 国产精一区二区三区| 亚洲综合自拍偷拍| 久久蜜桃av一区精品变态类天堂| 91女人视频在线观看| 久久99久久久欧美国产| 亚洲黄色性网站| 精品国精品国产| 欧美色成人综合| 成人h动漫精品一区二| 日本在线观看不卡视频| 成人免费视频在线观看| 日韩一区二区三区在线| 97se亚洲国产综合自在线| 久久99精品久久久久久国产越南| 一区二区三区在线视频播放| 久久免费国产精品| 欧美二区乱c少妇| 91国在线观看| av激情成人网| 国产传媒欧美日韩成人| 老司机免费视频一区二区三区| 亚洲精品一卡二卡|