Currently socketcalls always return -EAGAIN even if the file descriptor is not set to nonblocking mode which is kinda out of place. Potential solution paths:
a) use BLOCKING_WAIT at the socketcall level (socket.c). The socket struct can have a single sleep queue. Pros: less complexity at the protocol level, no need to propagate nonblocking flag to protocol layer. Cons: not as flexible.
b) use BLOCKING_WAIT at the protocol level (tcp.c/udp.c). Pros: fully customizable by syscall/whatever. Cons: need to figure out how to propagate the nonblocking flag.
Currently socketcalls always return
-EAGAIN
even if the file descriptor is not set to nonblocking mode which is kinda out of place. Potential solution paths:a) use
BLOCKING_WAIT
at the socketcall level (socket.c). The socket struct can have a single sleep queue. Pros: less complexity at the protocol level, no need to propagate nonblocking flag to protocol layer. Cons: not as flexible.b) use
BLOCKING_WAIT
at the protocol level (tcp.c/udp.c). Pros: fully customizable by syscall/whatever. Cons: need to figure out how to propagate the nonblocking flag.