Changes between Version 20 and Version 21 of kernel_syscalls
- Timestamp:
- Nov 26, 2014, 6:36:59 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_syscalls
v20 v21 56 56 This 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 57 * '''is_isr''' : boolean (RX transfer if non zero) 58 Returns 0if success. Return -1 if no NIC channel available, or if no CMA channel available.58 Returns the NIC channel index if success. Return -1 if no NIC channel available, or if no CMA channel available. 59 59 60 60 === 2) int '''_sys_nic_start'''( unsigned int is_rx ) === 61 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 62 * '''is_isr''' : boolean (RX transfer if non zero) 63 * '''mac4''' : 32 LSB bits of the MAC address64 * '''mac4''' : 16 MSB bits of the MAC address65 63 Returns 0 if success. Returns -1 if no NIC channel or no CMA channel allocated to the calling task. 66 64 67 === 3) int '''_sys_nic_move'''( unsigned int is_rx, void* buffer ) === 68 This function moves one 4kbytes container between the kernel chbuf allocated to the calling task, and an user buffer. 65 === 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. 69 68 * '''is_isr''' : boolean (RX transfer if non zero) 70 69 * '''buffer''' is the user buffer virtual base address. … … 72 71 It is blocking if the kernel chbuf is empty (for an RX transfer) or full (for a TX transfer). The bloking situation 73 72 is bounded by a timeout defined by the GIET_NIC_TIMEOUT parameter defined in the ''giet_config.h'' file. 74 Returns 0 if success, returns -1 if the user buffer address is illegal, or if the re is no NIC_RX channel allocated to the calling task, or if the timeout is elapsed.73 Returns 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. 75 74 76 75 === 4) int '''_sys_nic_stop'''( unsigned int is_rx ) ===