I am using a program called Netmap. I have two interfaces (eth0 and eth1) and I create a netmap instance on each of the interfaces.
Let's call the file descriptor of eth0's netmap instance as fd0. Eth1's will be fd1. Also, the event here is POLLOUT.
If I have one thread polling either interface, then poll()
always returns positive. As soon as I create a 2nd thread to poll the other interface, then both of the poll()
calls return 0.
Example: I create a thread to poll()
on fd0. poll()
always returns a positive value. As soon as I poll()
on fd1, both poll()
's return 0.
Why is this?