49 | | This blocking function try to tranfer one or several contiguous blocks of data from the block device to a memory buffer. The calling thread is registered in the device pending request queue, and descheduled, waiting on transfer completion. It is re-activared by the IRQ signaling completion. It must be called in the client cluster. |
| 44 | === B.1) '''void dev_ioc_read()''' === |
| 45 | |
| 46 | This blocking function try to tranfer one or several contiguous blocks of data from the block device to a memory buffer. The calling thread is registered in the device pending request queue, and descheduled, waiting on transfer completion. |
| 47 | The <buffer> argument is a |
| 48 | The <lba> argument is the first block index in block device. |
| 49 | The <count> argument is the number of blocks to move. |
| 50 | |
| 51 | === 2) '''void dev_ioc_write()''' === |
| 52 | |
| 53 | This blocking function try to tranfer one or several contiguous blocks of data from a memory buffer to the block device. The calling thread is actually registered in the device pending request queue, and descheduled, waiting on transfer completion. |
56 | | This blocking function try to tranfer one or several contiguous blocks of data from a memory buffer to the block device. The calling thread is actually registered in the device pending request queue, and descheduled, waiting on transfer completion. It is re-activared by the IRQ signaling completion. It must be called in the client cluster. |
57 | | The <buffer> argument is... |
58 | | The <lba> argument is the first block index in block device. |
59 | | The <count> argument is the number of blocks to move. |
| 60 | The IOC device defines defines four command types to access the IOC driver(s) : |
| 61 | - '''IOC_WRITE''' : move blocks from a kernel buffer to the IOC device, with a descheduling policy. |
| 62 | - '''IOC_READ''' : move blocks from the IOC device to a kernel buffer, with a descheduling policy. |
| 63 | - '''IOC_SYNC_WRITE''' : |
| 64 | - '''IOC_SYNC_READ''' : |
| 65 | |
| 66 | These four commands use the three following arguments, that must be registered, with the command type, in the ''ioc_command_t'' structure embedded in the client thread descriptor : |
| 67 | - '''npixels''' : number of pixels to be moved. |
| 68 | - '''buffer''' : pointer on buffer in (can be in user space or in kernel space). |
| 69 | - '''offset''' : offset in FBF (number of pixels). |