📄 ramdiskcbio.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ramDiskCbio.html - generated by refgen from ramDiskCbio.c --> <title> ramDiskCbio </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>ramDiskCbio</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ramDiskCbio</strong> - RAM Disk Cached Block Driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./ramDiskCbio.html#ramDiskDevCreate">ramDiskDevCreate</a>( )</b> - Initialize a RAM Disk device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements a RAM-disk driver with a CBIO interfacewhich can be directly utilized by <b><a href="./dosFsLib.html#top">dosFsLib</a></b> without the use of the Disk Cache module dcacheCbio. This results in anultra-compact RAM footprint. This module is implemented using the CBIO API (see <b>cbioLib( )</b>)<p>This module is delivered in source as a functional example of a basic CBIO module.<p></blockquote><h4>CAVEAT</h4><blockquote><p>This module may be used for SRAM or other non-volatile RAM cards to store a file system, but that configuration will be susceptibleto data corruption in events of system failure which are not normallyobserved with magnetic disks, i.e. using this driver with an SRAM cardcan not guard against interruptions in midst of updating a particularsector, resulting in that sector become internally inconsistent.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b>, <b><a href="./cbioLib.html#top">cbioLib</a></b><hr><a name="ramDiskDevCreate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ramDiskDevCreate( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ramDiskDevCreate( )</strong> - Initialize a RAM Disk device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>CBIO_DEV_ID ramDiskDevCreate ( char * pRamAddr, /* where it is in memory (0 = malloc) */ int bytesPerBlk, /* number of bytes per block */ int blksPerTrack, /* number of blocks per track */ int nBlocks, /* number of blocks on this device */ int blkOffset /* no. of blks to skip at start of device */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function creates a compact RAM-Disk device that can be directlyutilized by <b><a href="./dosFsLib.html#top">dosFsLib</a></b>, without the intermediate disk cache.It can be used for non-volatile RAM as well as volatile RAM disks.<p>The RAM size is specified in terms of total number of blocks in thedevice and the block size in bytes. The minimal block size is 32 bytes.If <i>pRamAddr</i> is NULL, space will be allocated from the default memorypool.<p></blockquote><h4>RETURNS</h4><blockquote><p>a CBIO handle that can be directly used by <b><a href="./dosFsLib.html#dosFsDevCreate">dosFsDevCreate</a>( )</b>or NULL if the requested amount of RAM is not available.<p></blockquote><h4>CAVEAT</h4><blockquote><p>When used with NV-RAM, this module can not eliminate mid-blockwrite interruption, which may cause file system corruption notexistent in common disk drives.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ramDiskCbio.html#top">ramDiskCbio</a></b>, <b><a href="./dosFsLib.html#dosFsDevCreate">dosFsDevCreate</a>( )</b>.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -