Changes between Version 24 and Version 25 of kernel_syscalls


Ignore:
Timestamp:
Dec 29, 2014, 11:20:49 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_syscalls

    v24 v25  
    5555=== 1) int '''_sys_nic_alloc'''( unsigned int is_rx ) ===
    5656This function allocates a private NIC_RX or NIC_TX channel, the associated chbuf, and a private CMA channel to the calling task. It register these channel indexes in the task context.
    57  * '''is_isr''' : boolean (RX transfer if non zero)
     57 * '''is_rx''' : boolean (RX transfer if non zero)
    5858Returns the NIC channel index if success. Return -1 if no NIC channel available, or if no CMA channel available.
    5959
    6060=== 2) int '''_sys_nic_start'''( unsigned int is_rx ) ===
    61 This function starts the NIC channel allocated to the calling task, and starts the CMA transfer between the internal NIC chbuf and the kernel chbuf allocated to the calling task.
    62  * '''is_isr''' : boolean (RX transfer if non zero)
     61This function initializes the kernel chbuf allocated to the calling task. It allocates the distributed 4 Kbytes containers (2 containers per cluster) from the distributed kernel heap, and initializes the kernel chbuf  describing the containers status. This chbuf descriptor is allocated in the seg_kernel_data segment in cluster [0,0].
     62It starts the NIC channel allocated to the calling task, and starts the CMA transfer between the NIC chbuf and the distributed kernel chbuf. The CMA component is configured in OUT_OF_ORDER transfer mode (non blocking when a DST buffer is full.
     63 * '''is_rx''' : boolean (RX transfer if non zero)
    6364Returns 0 if success. Returns -1 if no NIC channel or no CMA channel allocated to the calling task.
    6465
    6566=== 3) int '''_sys_nic_move'''(  unsigned int nic_channel,  unsigned int is_rx,  void* buffer ) ===
    66 This function moves one 4kbytes container between the kernel chbuf defined by the nic_channel argument, and an user buffer.
    67  * '''nic_channel''' : selected nic_chbuf channel.
    68  * '''is_isr''' : boolean (RX transfer if non zero)
     67This function moves one 4 Kbytes container from the kernel chbuf defined by the ''nic_channel'' argument, to an user buffer defined by the ''buffer'' argument. This blocking function enforces locality and parallelism: it scans the two containers  located in the same cluster as the calling task, and returns only when a full container has been found.
     68 * '''nic_channel''' : selected nic channel.
     69 * '''is_rx''' : boolean (RX transfer if non zero)
    6970 * '''buffer''' is the user buffer virtual base address.
    70 It supports concurrent kernel access to the chbuf, because It takes the lock protecting exclusive access to the chbuf pointer (index field).
    71 It is blocking if the kernel chbuf is empty (for an RX transfer) or full (for a TX transfer). The bloking situation
    72 is bounded by a timeout defined by the GIET_NIC_TIMEOUT parameter defined in the ''giet_config.h'' file.
    7371Returns 0 if success, returns -1 if the user buffer address is illegal, or if the NIC channel is too large, or if the timeout is elapsed.
    7472
    7573=== 4) int '''_sys_nic_stop'''( unsigned int is_rx ) ===
    7674This function stops the NIC and the CMA channels allocated to the calling task.
    77  * '''is_isr''' : boolean (RX transfer if non zero)
     75 * '''is_rx''' : boolean (RX transfer if non zero)
    7876Returns 0 if success. Returns -1 if no NIC channel or no CMA channel allocated to the calling task.
    7977