Changes between Version 37 and Version 38 of library_stdio


Ignore:
Timestamp:
Nov 26, 2014, 6:15:30 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v37 v38  
    120120The NIC channel and the CMA channel are registered in the task context.
    121121
    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'''( ) ===
     123This 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.
    124124The calling task exit if no available NIC_TX channel, or no available CMA channel.
    125125
    126126 === 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.
     127This 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
     128in 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.
    128129The calling task exit if no available NIC_RX channel, or no available CMA channel.
    129130
    130131 === 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.
     132This function activates both the NIC_TX channel, and the CMA channel allocated to the calling task.
     133The 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.
    133134
    134135 === 4) void '''giet_nic_rx_start'''( ) ===
    135 This function activates both the NIC_RX channel and the CMA channel allocated to the calling task.
     136This function activates both the NIC_RX channel, and the CMA channel allocated to the calling task.
    136137The calling task exit if no allocated NIC_RX channel or no allocated CMA channel.
    137138
    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 ) ===
     140This 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.
     143Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
     144It returns only when the container has been fully transfered.
     145The 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 ) ===
     148This 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.
    140150 * '''buffer'''  is the container base address in user space.
    141151Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
    142152It 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.
     153The 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.
    151154
    152155 === 7) void '''giet_nic_tx_stop( ) ===