pub fn sys_accept(abi: &mut LinuxRiscv64Abi, trapframe: &mut Trapframe) -> usizeExpand description
Linux sys_accept implementation (mock)
Accepts a connection on a socket. This is a mock implementation that creates a new pipe and returns it as a “connected” socket fd.
Arguments:
- abi: LinuxRiscv64Abi context
- trapframe: Trapframe containing syscall arguments
- arg0: sockfd (socket file descriptor)
- arg1: addr (pointer to socket address structure for peer)
- arg2: addrlen (pointer to size of address structure)
Returns:
- new socket file descriptor on success
- usize::MAX (Linux -1) indicating failure