Changes between Version 11 and Version 12 of kernel_syscalls
- Timestamp:
- Nov 9, 2014, 1:34:34 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_syscalls
v11 v12 51 51 == __NIC related syscall handlers__ == 52 52 53 === int '''_sys_nic_ alloc'''() ===54 This function allocates a private NIC channelto the calling task, and register the channel index in the task context.55 Return -1 if no NIC channel available.53 === int '''_sys_nic_rx_alloc'''() === 54 This function allocates a private NIC_RX channel, and the associated RX chbuf to the calling task, and register the channel index in the task context. 55 Return -1 if no NIC_RX channel available. 56 56 57 === int '''_sys_nic_sync_send'''( void* vbuf ) === 58 This function uses a physical_memcpy() to transfer a 4kbytes container from an user buffer to a private NIC TX channel. It computes the physical base address associated to the user buffer. Returns 0 if success, returns -1 if the buffer address is illegal, or if there is no NIC channel allocated to the calling task. 57 === int '''_sys_nic_tx_alloc'''() === 58 This function allocates a private NIC_TX channel, and the associated TX chbuf to the calling task, and register the channel index in the task context. 59 Return -1 if no NIC_TX channel available. 59 60 60 === int '''_sys_nic_sync_receive'''( void* vbuf ) === 61 This function uses a physical_memcpy() to transfer a 4kbytes container from a private NIC RX channel to an user buffer. It computes the physical base address associated to the user buffer. Returns 0 if success, returns -1 if the buffer address is illegal, or if there is no NIC channel allocated to the calling task. 61 === int '''_sys_nic_send_container'''( void* vbuf ) === 62 This function transfer a 4kbytes container from an user buffer, to the private kernel TX chbuf allocated to the calling task. It is blocking if the kernel TX chbuf is full, with a time-out limit. 63 Returns 0 if success, returns -1 if the user buffer address is illegal, returns -2 if there is no NIC channel allocated to the calling task, returns -3 if the timeout is elapsed. 64 65 === int '''_sys_nic_receive_container'''( void* vbuf ) === 66 This function transfer a 4kbytes container from the private RX chbuf allocated to the calling task, to an user buffer. It is blocking if the chbuf is empty, with a time_out limit. 67 Returns 0 if success, returns -1 if the user buffer address is illegal, returns -2 if there is no NIC channel allocated to the calling task, returns -3 if the timeout is elapsed. 62 68 63 69