Changeset 614 for trunk/kernel/devices/dev_ioc.h
- Timestamp:
- Jan 15, 2019, 1:59:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_ioc.h
r457 r614 38 38 * magnetic hard disk or a SD card, that can store blocks of data in a linear array 39 39 * of sectors indexed by a simple lba (logic block address). 40 * It supports three command types: 41 * - READ : move blocks from device to memory, with a descheduling policy. 42 * - WRITE : move blocks from memory to device, with a descheduling policy. 43 * - SYNC_READ : move blocks from device to memory, with a busy waiting policy. 40 * It supports four command types: 41 * - READ : move blocks from device to memory, with a descheduling policy. 42 * - WRITE : move blocks from memory to device, with a descheduling policy. 43 * - SYNC_READ : move blocks from device to memory, with a busy waiting policy. 44 * - SYNC_WRITE : move blocks from memory to device, with a busy waiting policy. 44 45 45 46 * A READ or WRITE operation requires dynamic ressource allocation. The calling thread … … 64 65 * 3) release the WTI mailbox to the client cluster WTI allocator. 65 66 * 66 * The SYNC_READ operation is used by the kernel in the initialisation phase. It does67 * not uses the IOC device waiting queue and server thread, and does not use the IOC IRQ,68 * but implement a busy-waiting policy for the calling thread.67 * The SYNC_READ and SYNC_WRITE operations are used by the kernel in the initialisation 68 * phase. These operations do not not use the IOC device waiting queue, the server thread, 69 * and the IOC IRQ, but implement a busy-waiting policy for the calling thread. 69 70 *****************************************************************************************/ 70 71 … … 85 86 *****************************************************************************************/ 86 87 87 enum ioc_impl_e 88 typedef enum 88 89 { 89 90 IMPL_IOC_BDV = 0, … … 99 100 *****************************************************************************************/ 100 101 101 enum102 typedef enum 102 103 { 103 104 IOC_READ = 0, 104 105 IOC_WRITE = 1, 105 106 IOC_SYNC_READ = 2, 106 }; 107 IOC_SYNC_WRITE = 3, 108 } 109 cmd_type_t; 107 110 108 111 typedef struct ioc_command_s … … 131 134 132 135 /****************************************************************************************** 133 * This blocking function try to tranferone or several contiguous blocks of data136 * This blocking function moves one or several contiguous blocks of data 134 137 * from the block device to a local memory buffer. The corresponding request is actually 135 138 * registered in the device pending request queue, and the calling thread is descheduled, … … 147 150 148 151 /****************************************************************************************** 149 * This blocking function try to tranferone or several contiguous blocks of data152 * This blocking function moves one or several contiguous blocks of data 150 153 * from a local memory buffer to the block device. The corresponding request is actually 151 154 * registered in the device pending request queue, and the calling thread is descheduled, … … 163 166 164 167 /****************************************************************************************** 165 * This blocking function try to tranferone or several contiguous blocks of data166 * from the block device to a memory buffer.168 * This blocking function moves one or several contiguous blocks of data 169 * from the block device to a local memory buffer. 167 170 * It does not uses the IOC device waiting queue and server thread, and does not use 168 171 * the IOC IRQ, but call directly the relevant IOC driver, implementing a busy-waiting … … 179 182 uint32_t count ); 180 183 184 /****************************************************************************************** 185 * This blocking function moves one or several contiguous blocks of data 186 * from a local memory buffer to the block device. 187 * It does not uses the IOC device waiting queue and server thread, and does not use 188 * the IOC IRQ, but call directly the relevant IOC driver, implementing a busy-waiting 189 * policy for the calling thread. 190 * It must be called in the client cluster. 191 ****************************************************************************************** 192 * @ buffer : local pointer on source buffer in memory (must be block aligned). 193 * @ lba : first block index on device. 194 * @ count : number of blocks to transfer. 195 * @ returns 0 if success / returns EINVAL if error. 196 *****************************************************************************************/ 197 error_t dev_ioc_sync_write( uint8_t * buffer, 198 uint32_t lba, 199 uint32_t count ); 200 181 201 #endif /* _DEV_IOC_H */
Note: See TracChangeset
for help on using the changeset viewer.