Changes between Version 37 and Version 38 of library_stdio
- Timestamp:
- Nov 26, 2014, 6:15:30 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v37 v38 120 120 The NIC channel and the CMA channel are registered in the task context. 121 121 122 === 1) void'''giet_nic_tx_alloc'''( ) ===123 This function allocates a private NIC_TX channel (coming with the associated kernel NIC_TX chbuf), and a private CMA channel to the calling task. It registers the corresponding indexes in the calling task context.122 === 1) int '''giet_nic_tx_alloc'''( ) === 123 This function allocates a private NIC_TX channel (coming with the associated kernel NIC_TX chbuf), and a private CMA channel to the calling task. It registers both indexes in the calling task context, and returns the NIC channel index, as this channel can be shared by severals tasks of a parallel multi-tasks application. 124 124 The calling task exit if no available NIC_TX channel, or no available CMA channel. 125 125 126 126 === 2) void '''giet_nic_rx_alloc'''( ) === 127 This function allocates a private NIC_RX channel (coming with the associated kernel NIC_RX chbuf), and a private CMA channel to the calling task. It registers the corresponding indexes in the calling task context. 127 This function allocates a private NIC_RX channel (coming with the associated kernel NIC_RX chbuf), and a private CMA channel to the calling task. It registers both indexes 128 in the calling task context, and returns the NIC channel index, as this channel can be shared by severals tasks of a parallel multi-tasks application. 128 129 The calling task exit if no available NIC_RX channel, or no available CMA channel. 129 130 130 131 === 3) void '''giet_nic_tx_start'''( ) === 131 This function activates both the NIC_TX channel and the CMA channel allocated to the calling task.132 The calling task exit if no allocated NIC_TX channel or no allocated CMA channel .132 This function activates both the NIC_TX channel, and the CMA channel allocated to the calling task. 133 The calling task exit if no allocated NIC_TX channel or no allocated CMA channel, or if the NIC channel argument does not fit the channel allocated to the calling task. 133 134 134 135 === 4) void '''giet_nic_rx_start'''( ) === 135 This function activates both the NIC_RX channel and the CMA channel allocated to the calling task.136 This function activates both the NIC_RX channel, and the CMA channel allocated to the calling task. 136 137 The calling task exit if no allocated NIC_RX channel or no allocated CMA channel. 137 138 138 === 5) void '''giet_nic_tx_move'''( void* buffer ) === 139 This blocking function requires to transfer one container (GIET_NIC_CHBUF_SIZE bytes) from an user buffer to the kernel chbuf allocated to the calling task. 139 === 5) void '''giet_nic_tx_move'''( unsigned int nic_channel, void* buffer ) === 140 This blocking function transfer one container (GIET_NIC_CHBUF_SIZE bytes) from an user buffer to the kernel chbuf defined by the nic_channel argument. 141 * '''nic_channel''' define the NIC channel index. 142 * '''buffer''' is the container base address in user space. 143 Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. 144 It returns only when the container has been fully transfered. 145 The calling task exit if no NIC channel allocated to the task, or in case of timeout, or if the buffer is not in user space. 146 147 === 6) void '''giet_nic_rx_move'''( unsigned int nic_channel, void* buffer ) === 148 This blocking function transfer one container (GIET_NIC_CHBUF_SIZE bytes) from the kernel chbuf defined by the nic_channel argument to an user buffer. 149 * '''nic_channel''' define the NIC channel index. 140 150 * '''buffer''' is the container base address in user space. 141 151 Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. 142 152 It returns only when the container has been fully transfered. 143 The calling task exit if no NIC channel allocated to the task, or in case of timeout. 144 145 === 6) void '''giet_nic_rx_move'''( void* buffer ) === 146 This blocking function requires to transfer one container (GIET_NIC_CHBUF_SIZE bytes) from the kernel chbuf allocated to the calling task to an user buffer. 147 * '''buffer''' is the container base address in user space. 148 Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. 149 It returns only when the container has been fully transfered. 150 The calling task exit if no NIC channel allocated to the task, or in case of timeout. 153 The calling task exit if no NIC channel allocated to the task, or in case of timeout, or if the buffer is not in user space. 151 154 152 155 === 7) void '''giet_nic_tx_stop( ) ===