poll(2)ing or select(2)ing /dev/usb0
Dirk Gouders
gouders at et.bocholt.fh-ge.de
Tue May 24 10:53:33 GMT 2005
Hello,
in the section USB CONTROLLER INTERFACE the manual page usb(4) says
that one can use poll(2) on /dev/usbN to get noticed when USB devices
are connected or disconnected.
Now, I wrote two small programs to play with poll(2) and select(2)
on /dev/usb0 and see what happens if I connect/disconnect a USB
device, but nothing happens. As the manual page does not say
what events to poll(2) for, I just turned on all bits in the events
mask and the programs work fine on the event interface /dev/usb.
I am now wondering, if it is correct what the manual page says about
poll(2)ing /dev/usbN. If so, what results should be expected, if
several processes are accessing /dev/usb0 (usually usbd(8) is also
running and it also has opened /dev/usb0 on my machine)?
Dirk
More information about the freebsd-usb
mailing list