Changeset 8b96149 in rtems for cpukit/libblock/include
- Timestamp:
- Apr 17, 2004, 8:15:17 AM (17 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- d63a2c2
- Parents:
- 714f06c
- Location:
- cpukit/libblock/include/rtems
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libblock/include/rtems/bdbuf.h
r714f06c r8b96149 32 32 * dev and block fields are search key in AVL-tree. 33 33 * Modified buffers, free buffers and used buffers linked in 'mod', 'free' and 34 * 'lru' chains appropriately. 34 * 'lru' chains appropriately. 35 35 */ 36 36 … … 38 38 Chain_Node link; /* Link in the lru, mod or free chains */ 39 39 40 struct bdbuf_avl_node { 40 struct bdbuf_avl_node { 41 41 signed char cache; /* Cache */ 42 42 … … 87 87 88 88 /* rtems_bdbuf_init -- 89 * Prepare buffering layer to work - initialize buffer descritors 89 * Prepare buffering layer to work - initialize buffer descritors 90 90 * and (if it is neccessary) buffers. Buffers will be allocated accoriding 91 * to the configuration table, each entry describes kind of block and 91 * to the configuration table, each entry describes kind of block and 92 92 * amount requested. After initialization all blocks is placed into 93 93 * free elements lists. … … 108 108 * Obtain block buffer. If specified block already cached (i.e. there's 109 109 * block in the _modified_, or _recently_used_), return address 110 * of appropriate buffer descriptor and increment reference counter to 1. 111 * If block is not cached, allocate new buffer and return it. Data 112 * shouldn't be read to the buffer from media; buffer may contains 113 * arbitrary data. This primitive may be blocked if there are no free 114 * buffer descriptors available and there are no unused non-modified 110 * of appropriate buffer descriptor and increment reference counter to 1. 111 * If block is not cached, allocate new buffer and return it. Data 112 * shouldn't be read to the buffer from media; buffer may contains 113 * arbitrary data. This primitive may be blocked if there are no free 114 * buffer descriptors available and there are no unused non-modified 115 115 * (or synchronized with media) buffers available. 116 116 * … … 164 164 * PARAMETERS: 165 165 * bd_buf - pointer to the bdbuf_buffer structure previously obtained using 166 * get/read primitive. 166 * get/read primitive. 167 167 * 168 168 * RETURNS: … … 178 178 /* rtems_bdbuf_release_modified -- 179 179 * Release buffer allocated before, assuming that it is _modified_ by 180 * it's owner. This primitive decrease usage counter for buffer, mark 180 * it's owner. This primitive decrease usage counter for buffer, mark 181 181 * buffer descriptor as modified. If usage counter is 0, insert it at 182 182 * end of mod chain and release flush_sema semaphore to activate the … … 243 243 * RETURNS: 244 244 * RTEMS status code: RTEMS_SUCCESSFUL if operation completed successfully, 245 * RTEMS_INVALID_SIZE if specified block size is invalid (not a power 245 * RTEMS_INVALID_SIZE if specified block size is invalid (not a power 246 246 * of 2), RTEMS_NOT_DEFINED if buffer pool for this or greater block size 247 247 * is not configured. … … 257 257 * block_size - block size for which buffer pool is configured returned 258 258 * there 259 * blocks - number of buffers in buffer pool returned there 259 * blocks - number of buffers in buffer pool returned there 260 260 * 261 261 * RETURNS: -
cpukit/libblock/include/rtems/blkdev.h
r714f06c r8b96149 1 /* 1 /* 2 2 * blkdev.h - block device driver interface definitions 3 3 * … … 19 19 20 20 /* Interface with device drivers 21 * Block device looks, initialized and behaves like traditional RTEMS device 21 * Block device looks, initialized and behaves like traditional RTEMS device 22 22 * driver. Heart of the block device driver is in BIOREQUEST ioctl. This call 23 23 * puts I/O request to the block device queue, in priority order, for … … 44 44 * status != RTEMS_SUCCESSFUL 45 45 */ 46 typedef void (* blkdev_request_cb)(void *arg, 46 typedef void (* blkdev_request_cb)(void *arg, 47 47 rtems_status_code status, 48 48 int error); … … 57 57 58 58 /* blkdev_request (Block Device Request) structure is 59 * used to read/write a number of blocks from/to device. 59 * used to read/write a number of blocks from/to device. 60 60 */ 61 61 typedef struct blkdev_request { … … 64 64 void *done_arg; /* Argument to be passed to callback function*/ 65 65 rtems_status_code status; /* Last I/O operation completion status */ 66 int error; /* If status != RTEMS_SUCCESSFUL, this field 66 int error; /* If status != RTEMS_SUCCESSFUL, this field 67 67 * contains error code 68 68 */ 69 69 blkdev_bnum start; /* Start block number */ 70 70 uint32_t count; /* Number of blocks to be exchanged */ 71 uint32_t bufnum; /* Number of buffers provided */ 71 uint32_t bufnum; /* Number of buffers provided */ 72 72 73 73 blkdev_sg_buffer bufs[0];/* List of scatter/gather buffers */ … … 81 81 82 82 /* Device driver interface conventions suppose that driver may 83 * contain initialize/open/close/read/write/ioctl entry points. These 84 * primitives (except initialize) can be implemented in generic fashion, 83 * contain initialize/open/close/read/write/ioctl entry points. These 84 * primitives (except initialize) can be implemented in generic fashion, 85 85 * based upon supplied block device driver ioctl handler. Every block 86 86 * device driver should provide initialize entry point, which is register … … 105 105 106 106 /* blkdev_generic_write -- 107 * Generic block device driver write primitive. Implemented using block 108 * device buffer management primitives. 107 * Generic block device driver write primitive. Implemented using block 108 * device buffer management primitives. 109 109 */ 110 110 rtems_device_driver -
cpukit/libblock/include/rtems/diskdevs.h
r714f06c r8b96149 1 /* 1 /* 2 2 * logdisk.h - Physical and logical block devices (disks) support 3 3 * … … 49 49 in disk blocks */ 50 50 int block_size; /* Size of device block (minimum 51 transfer unit) in bytes 51 transfer unit) in bytes 52 52 (must be power of 2) */ 53 53 int block_size_log2; /* log2 of block_size */ … … 92 92 * invoked from application when application-specific splitting are in use, 93 93 * or from generic code which handle different logical disk organizations. 94 * This primitive will register device in rtems (invoke 94 * This primitive will register device in rtems (invoke 95 95 * rtems_io_register_name). 96 96 * … … 98 98 * dev - logical device identifier (major, minor numbers) 99 99 * phys - physical device (block device which holds this logical disk) 100 * identifier 100 * identifier 101 101 * start - starting block number on the physical device 102 102 * size - logical disk size in blocks … … 106 106 * RTEMS_SUCCESSFUL if logical device successfully added, or error code 107 107 * if error occured (device already registered, no physical device 108 * exists, logical disk is out of physical disk boundaries, no memory 108 * exists, logical disk is out of physical disk boundaries, no memory 109 109 * available). 110 110 */ … … 181 181 * 182 182 * RETURNS: 183 * RTEMS_SUCCESSFUL if library initialized, or error code if error 183 * RTEMS_SUCCESSFUL if library initialized, or error code if error 184 184 * occured. 185 185 */ … … 194 194 * 195 195 * RETURNS: 196 * RTEMS_SUCCESSFUL if all resources released, or error code if error 196 * RTEMS_SUCCESSFUL if all resources released, or error code if error 197 197 * occured. 198 198 */ -
cpukit/libblock/include/rtems/ide_part_table.h
r714f06c r8b96149 78 78 * corresponds to the sector on the device 79 79 */ 80 typedef struct sector_data_s 80 typedef struct sector_data_s 81 81 { 82 82 uint32_t sector_num; /* sector number on the device */
Note: See TracChangeset
for help on using the changeset viewer.