Select/Poll Logic for ddwrite and ddread Routines

Description

The ddread and ddwrite entry points require logic to support the select and poll operations. Depending on how the device driver is written, the interrupt routine may also need to include this logic as well.

The select/poll logic is required wherever code checks on the occurrence of desired events. At each point where one of the selection criteria is found to be true, the device driver should check whether a notification is due for that selection. If so, it should call the selnotify kernel service to notify the kernel of the event.

The devno, chan, and revents parameters are passed to the selnotify kernel service to indicate which device and which events have become true.